2 dropdowns on same frame wont work

I am trying to install 2 dropdown menus into a header frame so that when you choose the option the main frame below will change. This works as long as I only have one of the dropdowns on the frame. once I put the 2nd one in only one of them will work. You can click and the other and nothing happens. If I then remove the last one installed the original one will work again. I have pasted the html. Does anyone recognize my error. I assume something is named the same or something though I believe I have different names for the forms. This is being done in frontpage and I am cut and pasting the code from a site called "Sitecrafters". As you can probably tell this is my first
Possibly am I missing some html to separate the forms?

<html>

<head>
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 1</title>
<base target="main">
<meta name="Microsoft Border" content="none">
</head>

<body>

<div align="center">
  <center>
  <table border="1" width="100%" height="44">
    <tr>
     
     
      <td width="1%" height="24" valign="top"><form name="navform">
<p><select name="section" size="1" width="200" language="javascript" onchange="goto_page();">
   <option selected value="Navigate Site...">Navigate Site...</option>
   <option> - - - - - - - - - - - - - - - - - </option>
   <option>2 Staff Page</option>
   <option>3 Rex Home Page</option>
   <option>4 Services</option>
   <option>5 Dive Travel</option>
   <option>6 Site Index</option>
   <option>7 Dive Charters</option>
         <option>8 Local Tides</option>
      <option>9 Dive Links</option>
      <option>10 Rex Marina</option>

</select><script language="JavaScript"><!--
function goto_page() {
   if (document.navform.elements[0].selectedIndex == 0)
      window.parent.self.status=" Goes Nowhere";
else if (document.navform.elements[0].selectedIndex == 1)
      window.parent.self.status=" Goes Nowhere";
else if (document.navform.elements[0].selectedIndex == 2)
     window.open("http://www.rexdivecenter.com/staff.htm", target="main");
else if (document.navform.elements[0].selectedIndex == 3)
      window.open("http://www.rexdivecenter.com", target="main");
else if (document.navform.elements[0].selectedIndex == 4)
      window.open("http://www.rexdivecenter.com/services.htm", target="main");
else if (document.navform.elements[0].selectedIndex == 5)
      window.open("http://www.rexdivecenter.com/travel.htm", target="main");
else if (document.navform.elements[0].selectedIndex == 6)
      window.open("http://www.rexdivecenter.com/table_of_contents.htm", target="main");
else if (document.navform.elements[0].selectedIndex == 7)
      window.open("http://www.rexdivecenter.com/charters.htm", target="main");
else if (document.navform.elements[0].selectedIndex == 8)
      window.open("http://www.rexdivecenter.com/todays_tides.htm", target="main");
else if (document.navform.elements[0].selectedIndex == 9)
      window.open("http://www.rexdivecenter.com/divelinks.htm", target="main");
else if (document.navform.elements[0].selectedIndex == 10)
      window.open("http://www.rexdivecenter.com/marina.htm", target="main");
}
// --></script> </p>
</form></td>


      <td width="33%" height="24" valign="top"><form name="gearform">
<p><select name="section" size="1" width="200" language="javascript" onchange="goto_page();">
   <option selected value="Dive Gear...">Dive Gear...</option>
   <option> - - - - - - - - - - - - - - - - - </option>
   <option>2 Wetsuits</option>
   <option>3 Drysuits</option>
   <option>4 Accessories</option>
   <option>5 BC's</option>
   <option>6 Cameras</option>
   <option>7 Dive Computers</option>
   <option>8 Dive Lights</option>
   <option>9 Fins</option>
   <option>10 Guages/Consoles</option>
   <option>11 Regulators</option>
   <option>12 Masks/Snorkels</option>
   <option>13 Inflatables</option>
 
</select><script language="JavaScript"><!--
function goto_page() {
   if (document.gearform.elements[0].selectedIndex == 0)
      window.parent.self.status=" Goes Nowhere";
   else if (document.gearform.elements[0].selectedIndex == 1)
      window.parent.self.status=" Goes Nowhere";
 
else if (document.gearform.elements[0].selectedIndex == 2)
      window.open("http://www.rexdivecenter.com/equipment/wetsuits/wetsuits_info.htm", target="main");
else if (document.gearform.elements[0].selectedIndex == 3)
      window.open("http://www.rexdivecenter.com/equipment/drysuits/drysuit_info.htm", target="main");
else if (document.gearform.elements[0].selectedIndex == 4)
      window.open("http://www.rexdivecenter.com/construction.htm", target="main");
else if (document.gearform.elements[0].selectedIndex == 5)
      window.open("http://www.rexdivecenter.com/equipment/bc_s/bc_info.htm", target="main");
else if (document.gearform.elements[0].selectedIndex == 6)
     window.open("http://www.rexdivecenter.com/equipment/cameras/aquashot3.htm", target="main");
else if (document.gearform.elements[0].selectedIndex == 7)
      window.open("http://www.rexdivecenter.com/equipment/dive_computers/dive_computer_info.htm", target="main");
else if (document.gearform.elements[0].selectedIndex == 8)
      window.open("http://www.rexdivecenter.com/equipment/dive_lights/dive_lights.htm", target="main");
else if (document.gearform.elements[0].selectedIndex == 9)
      window.open("http://www.rexdivecenter.com/equipment/fins/fins_info.htm", target="main");
else if (document.gearform.elements[0].selectedIndex == 10)
      window.open("http://www.rexdivecenter.com/equipment/gauges_consoles/gauges_consoles_info.htm", target="main");
else if (document.gearform.elements[0].selectedIndex == 11)
      window.open("http://www.rexdivecenter.com/equipment/regulators/regulator_info.htm", target="main");
else if (document.gearform.elements[0].selectedIndex == 12)
      window.open("http://www.rexdivecenter.com/equipment/masks_snorkels/masks_info.htm", target="main");
else if (document.gearform.elements[0].selectedIndex == 13)
      window.open("http://www.rexdivecenter.com/equipment/inflatables.htm", target="main");
     
}
// --></script> </p></td>
      <td width="35%" height="24" valign="top">Cell 3</td>
     
     
     
      <td width="16%" height="24" valign="top">Cell4</td>
    </tr>
  </table>
  </center>
</div>

</body>

</html>
DavidNPDAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
drapocConnect With a Mentor Commented:
I pasted in the changed code, when I run this in IE5 it now goes to different pages and both pages are working. You were declaring the goto_page function twice I changed the first function to goto_page1 and the second to goto_page2 and then changed the event handler to point to the correct function. When you choose something now it spawns a new window, and displays the content, it did not load a new frame though.


<html>

<head>
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 1</title>
<base target="main">
<meta name="Microsoft Border" content="none">
</head>

<body>

<div align="center">
  <center>
  <table border="1" width="100%" height="44">
    <tr>


      <td width="1%" height="24" valign="top"><form name="navform">
<p><select name="section" size="1" width="200" language="javascript" onchange="goto_page1();">
   <option selected value="Navigate Site...">Navigate Site...</option>
   <option> - - - - - - - - - - - - - - - - - </option>
   <option>2 Staff Page</option>
   <option>3 Rex Home Page</option>
   <option>4 Services</option>
   <option>5 Dive Travel</option>
   <option>6 Site Index</option>
   <option>7 Dive Charters</option>
    <option>8 Local Tides</option>
<option>9 Dive Links</option>
<option>10 Rex Marina</option>

</select><script language="JavaScript">
<!--
function goto_page1() {
   if (document.navform.elements[0].selectedIndex == 0)
      window.parent.self.status=" Goes Nowhere";
else if (document.navform.elements[0].selectedIndex == 1)
      window.parent.self.status=" Goes Nowhere";
else if (document.navform.elements[0].selectedIndex == 2)
     window.open("http://www.rexdivecenter.com/staff.htm", target="main");
else if (document.navform.elements[0].selectedIndex == 3)
      window.open("http://www.rexdivecenter.com", target="main");
else if (document.navform.elements[0].selectedIndex == 4)
      window.open("http://www.rexdivecenter.com/services.htm", target="main");
else if (document.navform.elements[0].selectedIndex == 5)
      window.open("http://www.rexdivecenter.com/travel.htm", target="main");
else if (document.navform.elements[0].selectedIndex == 6)
      window.open("http://www.rexdivecenter.com/table_of_contents.htm", target="main");
else if (document.navform.elements[0].selectedIndex == 7)
      window.open("http://www.rexdivecenter.com/charters.htm", target="main");
else if (document.navform.elements[0].selectedIndex == 8)
      window.open("http://www.rexdivecenter.com/todays_tides.htm", target="main");
else if (document.navform.elements[0].selectedIndex == 9)
      window.open("http://www.rexdivecenter.com/divelinks.htm", target="main");
else if (document.navform.elements[0].selectedIndex == 10)
      window.open("http://www.rexdivecenter.com/marina.htm", target="main");
}
// --></script> </p>
</form></td>


      <td width="33%" height="24" valign="top"><form name="gearform">
<p><select name="section" size="1" width="200" language="javascript" onchange="goto_page2();">
   <option selected value="Dive Gear...">Dive Gear...</option>
   <option> - - - - - - - - - - - - - - - - - </option>
   <option>2 Wetsuits</option>
   <option>3 Drysuits</option>
   <option>4 Accessories</option>
   <option>5 BC's</option>
   <option>6 Cameras</option>
   <option>7 Dive Computers</option>
   <option>8 Dive Lights</option>
   <option>9 Fins</option>
   <option>10 Guages/Consoles</option>
   <option>11 Regulators</option>
   <option>12 Masks/Snorkels</option>
   <option>13 Inflatables</option>

</select><script language="JavaScript"><!--
function goto_page2() {
   if (document.gearform.elements[0].selectedIndex == 0)
      window.parent.self.status=" Goes Nowhere";
   else if (document.gearform.elements[0].selectedIndex == 1)
      window.parent.self.status=" Goes Nowhere";

else if (document.gearform.elements[0].selectedIndex == 2)
      window.open("http://www.rexdivecenter.com/equipment/wetsuits/wetsuits_info.htm", target="main");
else if (document.gearform.elements[0].selectedIndex == 3)
      window.open("http://www.rexdivecenter.com/equipment/drysuits/drysuit_info.htm", target="main");
else if (document.gearform.elements[0].selectedIndex == 4)
      window.open("http://www.rexdivecenter.com/construction.htm", target="main");
else if (document.gearform.elements[0].selectedIndex == 5)
      window.open("http://www.rexdivecenter.com/equipment/bc_s/bc_info.htm", target="main");
else if (document.gearform.elements[0].selectedIndex == 6)
     window.open("http://www.rexdivecenter.com/equipment/cameras/aquashot3.htm", target="main");
else if (document.gearform.elements[0].selectedIndex == 7)
      window.open("http://www.rexdivecenter.com/equipment/dive_computers/dive_computer_info.htm", target="main");
else if (document.gearform.elements[0].selectedIndex == 8)
      window.open("http://www.rexdivecenter.com/equipment/dive_lights/dive_lights.htm", target="main");
else if (document.gearform.elements[0].selectedIndex == 9)
      window.open("http://www.rexdivecenter.com/equipment/fins/fins_info.htm", target="main");
else if (document.gearform.elements[0].selectedIndex == 10)
      window.open("http://www.rexdivecenter.com/equipment/gauges_consoles/gauges_consoles_info.htm", target="main");
else if (document.gearform.elements[0].selectedIndex == 11)
      window.open("http://www.rexdivecenter.com/equipment/regulators/regulator_info.htm", target="main");
else if (document.gearform.elements[0].selectedIndex == 12)
      window.open("http://www.rexdivecenter.com/equipment/masks_snorkels/masks_info.htm", target="main");
else if (document.gearform.elements[0].selectedIndex == 13)
      window.open("http://www.rexdivecenter.com/equipment/inflatables.htm", target="main");

}
// --></script> </p></td>
      <td width="35%" height="24" valign="top">Cell 3</td>



      <td width="16%" height="24" valign="top">Cell4</td>
    </tr>
  </table>
  </center>
</div>

</body>

</html>
0
 
DavidNPDAuthor Commented:
Excellent job thanks for the speedy response.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.