How do I integrate a simple navigation menu ?

toast

Gone !
Hello,

I'm willing to have a little popup menu, like the one bottom left of this forum page, to simplify navigation on my site.

Here's some code i've found about that matter. Can someone help me to complete it and to make the menu work ?

Code:
<form action="nieuws.asp" method="get">
 <select name="fac" LANGUAGE="JavaScript" onChange="document.forms[0].submit();">

  <option value="">SELECT AN ITEM</option>
  <option value="My Music">Listen to my Music</option>
  <option value="My Books">Read my Books</option>
  
 </select>
 <input type="hidden" name="id" value="niks">
</form>
 
Question: are you looking for a menu which will just send the user to a page based on what option they choose, or are you trying the send the result of the menu to nieuws.asp?
 
Trying to send the user to the page.

User opens the menu, select Music, and automatically, when he releases mouse, Music.html starts to load in same page.
 
Part 1:

<script language="JavaScript">
function formHandler(form){
var URL = document.form.site.options[document.form.site.selectedIndex].value;
window.location.href = URL;
}
</script>


Part2:

<form name="form">
<select name="site" size="1" onChange="javascript:formHandler()">
<option value="#" selected>Select A Job</option>
<option value="anyPageName.htm">Meeting And Event Professional</option>
<option value="anyPageName.htm">Meeting and Event Coordinators</option>
<option value="anyPageName.htm">Project Managers</option>
<option value="anyPageName.htm">Administrative Support</option>
<option value="anyPageName.htm">Registration Assistants</option>
<option value="anyPageName.htm">Marketing and Consulting</option>
<option value="anyPageName.htm">Site Inspections</option>
<option value="anyPageName.htm">Interns</option>
<option value="anyPageName.htm">Web-based Solution Experts</option>
<option value="anyPageName.htm">Professional Tour Guides</option>
<option value="anyPageName.htm">Ground Transportation, Shuttles and Meet-Greet Staff</option>
</select>
</form>
 
<option value="#" selected>Select A Job</option>
neat!
How many times have I put extra checks in to filter out "select an option"

I live and learn!
 
Wait ! The script won't work in Safari... or maybe it's my coding ?

Please check http://zolico.homedns.org/thinkhybrid/index.html

In the source, you'll see the last Java function is the one you gave me.
Then, fairly soon in my source, you'll find your <form> menu code, with only two options to keep it simple.

The menu appears on screen, but selecting "Contact" from it, for instance, won't bring me to the contact.html page. Help ! :confused:

I have attached my source to this post. The code I have copied from your post is made visible in this source. Please tell me where my code fails :)
 

Attachments

  • pagesource.txt
    7.2 KB · Views: 2
oops. Something happened in copy and past

<select name="site" size="1" onChange="java script:formHandler()">
--should be--
<select name="site" size="1" onChange="javascript:formHandler()">

just an extra space
 
Back
Top