diving_gal_lmtd
07-24-2005, 08:55 AM
I'm trying to get multiple combo boxes, working independently of each other, to work on one page. The item selected from any combo box should direct the user to a specific area of text using a bookmark.
No matter what I've tried, I can only get 1 combo box to work correctly. If an item is selected from another combo box, it simply directs the user to the last bookmark selected from the "working" combo box, or if no items were previously selected, it takes you to the first item's bookmark from the "working" combo box.
Example: Combo boxes A, B and C, each with 5 items bookmarked as #A1, #A2, ..#B1, #B2...#C1, #C2...etc. Combo box A works flawlessly, if you select item #A4, then select item #B3, it will take you back to #A4. If you then select #A2 it works fine, select #C1 and it goes back to #A2. If no items in "A" were selected, it takes you to #A1.
I know I must be missing an important detail, but I can't figure it out. Any help would be greatly appreciated. Here is a sample from the 1st 3 combos.
<form name="jumpy">
<script language="javascript">
<!--
/*Jumpy combo box credit:
JavaScript Kit (www.javascriptkit.com)
Over 200+ free JavaScripts here!
*/
function gone()
{
location=document.jumpy.example.options[document.jumpy.example.selectedIndex].value
}
//-->
</script>
<b><a href="#A">A. What is MonkeyRoyale? </a></b><br>
<select name="example" size="1" onChange="gone()">
<option value="#A1">What is MonkeyRoyale?</option>
<option value="#A2">What are the requirements for being a member of MonkeyRoyale?</option>
<option value="#A3">Is it free to join?</option>
<option value="#A4">Can I use AOL with MonkeyRoyale?</option>
</select>
<input type="button" name="test" value="Go!"
onClick="gone()">
<p> <b><a href="#B">B. Creating an Account.</a></b><br>
<select name="example2" size="1" onChange="gone()">
<option value="#B1">How do I register?</option>
<option value="#B2">Why do you need my personal information? Will this information be kept private?</option>
<option value="#B3">I messed up when I made my account and the name is wrong. Should I just make a new account with the right name?</option>
<option value="#B4">Can other members of my family join?</option>
<option value="#B5">Can I also join Royal Pogo Monkeys and Jungle Monkeys on Yahoo?</option>
<option value="#B6">Do I need to use the same ID for all divisions?</option>
</select>
<input type="button" name="test" value="Go!"
onClick="gone()">
</p>
<p><b><a href="#C">C. Getting Started.</a></b><br>
<select name="example3" size="1" onChange="gone()">
<option value="#C1">I've registered and signed in, what do I do now?</option>
<option value="#C2">How do I join a league?</option>
<option value="#C3">Can I join more than 1 league?</option>
<option value="#C4">How can I see the upcoming tourneys in my league?</option>
<option value="#C5">How do I remove a league from the My Leagues list?</option>
</select>
<input type="button" name="test" value="Go!"
onClick="gone()">
Item #A, #B and #C are titles for each corresponding combo box and are linked separately to bookmarks.
No matter what I've tried, I can only get 1 combo box to work correctly. If an item is selected from another combo box, it simply directs the user to the last bookmark selected from the "working" combo box, or if no items were previously selected, it takes you to the first item's bookmark from the "working" combo box.
Example: Combo boxes A, B and C, each with 5 items bookmarked as #A1, #A2, ..#B1, #B2...#C1, #C2...etc. Combo box A works flawlessly, if you select item #A4, then select item #B3, it will take you back to #A4. If you then select #A2 it works fine, select #C1 and it goes back to #A2. If no items in "A" were selected, it takes you to #A1.
I know I must be missing an important detail, but I can't figure it out. Any help would be greatly appreciated. Here is a sample from the 1st 3 combos.
<form name="jumpy">
<script language="javascript">
<!--
/*Jumpy combo box credit:
JavaScript Kit (www.javascriptkit.com)
Over 200+ free JavaScripts here!
*/
function gone()
{
location=document.jumpy.example.options[document.jumpy.example.selectedIndex].value
}
//-->
</script>
<b><a href="#A">A. What is MonkeyRoyale? </a></b><br>
<select name="example" size="1" onChange="gone()">
<option value="#A1">What is MonkeyRoyale?</option>
<option value="#A2">What are the requirements for being a member of MonkeyRoyale?</option>
<option value="#A3">Is it free to join?</option>
<option value="#A4">Can I use AOL with MonkeyRoyale?</option>
</select>
<input type="button" name="test" value="Go!"
onClick="gone()">
<p> <b><a href="#B">B. Creating an Account.</a></b><br>
<select name="example2" size="1" onChange="gone()">
<option value="#B1">How do I register?</option>
<option value="#B2">Why do you need my personal information? Will this information be kept private?</option>
<option value="#B3">I messed up when I made my account and the name is wrong. Should I just make a new account with the right name?</option>
<option value="#B4">Can other members of my family join?</option>
<option value="#B5">Can I also join Royal Pogo Monkeys and Jungle Monkeys on Yahoo?</option>
<option value="#B6">Do I need to use the same ID for all divisions?</option>
</select>
<input type="button" name="test" value="Go!"
onClick="gone()">
</p>
<p><b><a href="#C">C. Getting Started.</a></b><br>
<select name="example3" size="1" onChange="gone()">
<option value="#C1">I've registered and signed in, what do I do now?</option>
<option value="#C2">How do I join a league?</option>
<option value="#C3">Can I join more than 1 league?</option>
<option value="#C4">How can I see the upcoming tourneys in my league?</option>
<option value="#C5">How do I remove a league from the My Leagues list?</option>
</select>
<input type="button" name="test" value="Go!"
onClick="gone()">
Item #A, #B and #C are titles for each corresponding combo box and are linked separately to bookmarks.