Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

document.form.action validation problem

Status
Not open for further replies.

bamboo

Programmer
Aug 22, 2001
89
US
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.
 
What is your error?

--Dan
Whenever you find yourself on the side of the majority, it is time to pause and reflect.
Mark Twain
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top