+ Reply to Thread
Results 1 to 3 of 3

Thread: Error in codeing Please Help

  1. #1
    Circuitcode is offline x10Hosting Member Circuitcode is an unknown quantity at this point
    Join Date
    Sep 2008
    Posts
    7

    Error in codeing Please Help

    I have been working on this code for another member. I programmed it in Firefox and it worked great but when I try to use it in IE it will not pop up the window. I know i am missing something and I am hoping someone can shed some light on the problem.


    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title></title>
    </head>
    
    <script type="text/javascript">
    function openWin(zip, radius) {
        window.open("search.php?zip=" + zip + "&radius=" + radius, "Search Results", "width = 400px, height = 300px, scrollbars = yes");
        return false;
    }
    </script>
    
    <body>
    <form id="form1" name="form1" method="post" action="" onsubmit="return openWin(document.form1.zip.value, document.form1.radius.value);">
      Zip Code: 
      <label>
      <input name="zip" type="text" id="zip" />
      </label> 
      Radius: 
      <label>
      <select name="radius" id="radius">
        <option value="0">Please select</option>
        <option value="10">10</option>
        <option value="25">25</option>
        <option value="50">50</option>
        <option value="75">75</option>
        <option value="100">100</option>
      </select>
      </label>
      <label>
      <input name="search" type="submit" id="search" value="Search" />
      </label>
    </form>
    </body>
    </html>

  2. #2
    TheMan177 is offline x10 Sophmore TheMan177 is an unknown quantity at this point
    Join Date
    Jan 2008
    Posts
    179

    Re: Error in codeing Please Help

    Remove the spaces in the name of the window.

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title></title>
    </head>
    
    <script type="text/javascript">
    function openWin(zip, radius) {
        window.open("search.php?zip=" + zip + "&radius=" + radius, "Search_Results", "width = 400px, height = 300px, scrollbars = yes");
        return false;
    }
    </script>
    
    <body>
    <form id="form1" name="form1" method="post" action="" onsubmit="return openWin(document.form1.zip.value, document.form1.radius.value);">
      Zip Code: 
      <label>
      <input name="zip" type="text" id="zip" />
      </label> 
      Radius: 
      <label>
      <select name="radius" id="radius">
        <option value="0">Please select</option>
        <option value="10">10</option>
        <option value="25">25</option>
        <option value="50">50</option>
        <option value="75">75</option>
        <option value="100">100</option>
      </select>
      </label>
      <label>
      <input name="search" type="submit" id="search" value="Search" />
      </label>
    </form>
    </body>
    </html>
    That should work now.

  3. #3
    Circuitcode is offline x10Hosting Member Circuitcode is an unknown quantity at this point
    Join Date
    Sep 2008
    Posts
    7

    Re: Error in codeing Please Help

    Thanks works like a charm. I see what I did wrong.

+ Reply to Thread

Similar Threads

  1. codeing a site for me..
    By Skyline4life in forum The Marketplace
    Replies: 5
    Last Post: 10-20-2005, 06:53 AM
  2. codeing a site..
    By Skyline4life in forum Graphics & Webdesign
    Replies: 3
    Last Post: 05-20-2005, 06:56 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers