Hello: I’ve got this script that works fine – depending on the radio button, it redirects to the corresponding page to the radio button selected. It works with regular submit button and I need it for a css text button to instead work like submit button that calls the javascript to redirect on radio button selection.
However I need the script to work with a css text button.
Here’s the javascript function:
[code]
function radioRedirect(frm,nm){
for (var i_tem = 0,
coverage=frm.elements;
i_tem < coverage.length;
i_tem++)
if(coverage[i_tem].name==nm&&coverage[i_tem].checked)
frm.action=coverage[i_tem].value;
}
and the following is the form:
<!– form starts here –>
<form name=”frm” id=”frm” action=”#” onsubmit=”radioRedirect(this, ‘coverage’);”>
<input type=”radio” name=”coverage” value=”client_solicitation3.htm” />
<input type=”radio” name=”coverage” value=”client_solicitation3.htm” />
<input type=”radio” name=”coverage” value=”client_solicitation3.htm” />
<input type=”radio” name=”coverage” value=”client_solicitation3.htm” />
<input type=”radio” name=”coverage” value=”client_solicitation4.htm” />
<input type=”submit” value=”Go”> [redirects the pages fine]
<div class=”button_rightside”><a href=”#”>NEXT</a></div> [need this link to work like above ugly go button]
Thanks for your time and help
</form>