Results 1 to 4 of 4
Related
-
Need help creating a dvd inventory list from a CSV file Forum: HTML Forum
Replies: 5 -
validating the checkbox,list/menu.. Forum: Javascript Forum
Replies: 8 -
Creating a form with file submission Forum: Website Scripts Forum
Replies: 1 -
Need help creating a registration form for a competition Forum: PHP Forum
Replies: 3 -
need help with creating a online submission form Forum: PHP Forum
Replies: 3
-
02-04-2005, 12:48 PM #1
Help please: Creating a link in a form list/menu
Hello! I would like to ask how to make a link on a form's list/menu. Suppose I have this code :
<select name="select">
<option>Downloadable Forms</option> <option>History</option>
</select>
How do I put a link on each of these items? If
you guys have a better suggestion I would really like to see it. thanks in advance!
-
02-04-2005, 01:10 PM #2
Here's a quick site with several combo box options and the code for them...
http://www.pacosdrivers.com/wm/js.asp?cat=8
You need to create your select box with an onChange call to a JS element... the JS element can either be outside the page or in the <HEAD> section of the page.
Code:<select name="navigation" onChange="go()"> <option value="">--- Navigation ---</option> <option value="default.html">Home</option> <option value="page1.html">Page 1</option> <option value="page2.html">Page 2</option> </select>
Code:function go() { box = document.forms[0].navigation; destination = box.options[box.selectedIndex].value; if (destination) location.href = destination; }
Regards,Last edited by dlongnecker; 02-04-2005 at 01:17 PM.
-
02-04-2005, 11:40 PM #3
yes it helps a lot!!! thank you very much dlongnecker!
-
01-01-2008, 03:06 PM #4
Re: Help please: Creating a link in a form list/menu
That's all very well, but how do you do it with more than one list/menus? I've got three on the same page and I want the lists to link to other web pages.