View Full Version : Dynamic Hyperlink
09-26-2003, 03:17 PM
I have a form with a drop down list box containing years, (ex. 2003, 2004, etc.) I have a hyperlink that needs to pass the year that the user clicked from the drop down box. How can I do this?
09-26-2003, 03:25 PM
var sel = document.theForm.theDropDown;
var txt = sel.options[sel.selectedIndex].text;
window.location.href= theUrl + "?theYear=" + txt;
09-26-2003, 03:48 PM
Thanks A1ien51, but how do I call this function? Is it done in the href statement?
09-26-2003, 04:19 PM
09-26-2003, 04:21 PM
<a href="choseyearmanually.html" onclick="GotoPage('blah');return false;">
09-26-2003, 04:31 PM
09-26-2003, 06:30 PM
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.