View Full Version : Dynamic Hyperlink
09-26-2003, 02: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, 02:25 PM
var sel = document.theForm.theDropDown;
var txt = sel.options[sel.selectedIndex].text;
window.location.href= theUrl + "?theYear=" + txt;
09-26-2003, 02:48 PM
Thanks A1ien51, but how do I call this function? Is it done in the href statement?
09-26-2003, 03:19 PM
09-26-2003, 03:21 PM
<a href="choseyearmanually.html" onclick="GotoPage('blah');return false;">
09-26-2003, 03:31 PM
09-26-2003, 05:30 PM
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.