<a href="javascript:document.location.href='page.cfm?x=xxxx&productid=' + 
document.getElementById('mySelbox').options[document.getElementById('mySelbox').selectedIndex].value;">Text</a>

This may not be 100% as I haven't tested it, but it should be close.


-----Original Message-----
From: Che Vilnonis [mailto:[email protected]] 
Sent: Wednesday, September 16, 2009 3:54 PM
To: cf-talk
Subject: Simple JS question...


Hope this one is easy... how can I get the selected value from a form's
select box and then pass that value as a variable in a href? Can it be done
with an onClick event?

<a onclick="*some js here*;"
href="/account/index.cfm?mode=wishlist&productid=*js value here*">Add to
Wishlist</a><br />


Thanks, Che





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326371
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to