Hi, is there anyway to send a selected radio button field to an html page using javascript? Thank you!
Hi! Please explain a little more in detail what you mean. I am not sure what you are after. Regards - P
Sure, I have a few radio buttons, lets say one is for oranges and another is for tomatoes. Someone selects one of the options, they hit "send or submit." They are taken to one of my web pages for whichever option they picked. The web page that features oranges or the one that features tomatoes. I need some javascript that will do that please, thank you.
Hi, You can alter the action attribute of the form, something like this: var tomato = document.getElementById('opt-tomato'); addEHandler(tomato, 'click', function() { var parent; while (parent.nodeName.toLower() != 'form') parent = tomato.parentElement; parent.setAttribute('target', 'tomatoes.html'); }); Code (markup): Grab my event listeners code from here: http://dev.penagate.com/js/event-listeners.js Bear in mind this is not an accessible solution in that it relies on JS support so you would be better served just using links to the pages. Regards - P