I need to be able to control the document.action via a validation of a radio button. So if a particular radio button is checked, then it sets the document.form.action. I validate other fields before this, but this is the last thing in the function. Here's a simple example to explain what I'm trying to do.
function example()
{
if(document.frm1.IsBrowser[0].checked == true)
{
document.frm1.action='document.frm1.submit();
}
else if(document.frm1.IsBrowser[1].checked == true)
{
document.frm1.action='document.frm1.submit();
}
}
It submits and the URL field in the browser displays the correct location, however I'm getting a error. I'm doing something wrong in the js code.
function example()
{
if(document.frm1.IsBrowser[0].checked == true)
{
document.frm1.action='document.frm1.submit();
}
else if(document.frm1.IsBrowser[1].checked == true)
{
document.frm1.action='document.frm1.submit();
}
}
It submits and the URL field in the browser displays the correct location, however I'm getting a error. I'm doing something wrong in the js code.