Click to See Complete Forum and Search --> : form.action in IE


chandrasuresh
07-09-2003, 08:28 AM
Hi,
I tried the code "form.action("xxx.php") in my javascript. It works fine in Netscape. But, it says "Object not supported" in IE. How am I to do this in IE?

Thanks and regards,
Chandra

Khalid Ali
07-09-2003, 08:41 AM
formName.action = "xxx.php";

Will work.
Always try not to use form as a form reference,it could possibily cause some un expected results since its the HTMLForm elements tag name
document.formName.

brendandonhue
07-09-2003, 08:42 AM
Give the form an ID
<form id="myform" action="form.php">

And use JS something like this
var form = document.getElementById('myform');
form.setAttribute('action','xxx.php')

chandrasuresh
07-10-2003, 10:48 PM
Hi,
Thanks for the help. But, IE wouldn't accept any of the methods. Finally, I had to give up hope and let IE handle only one form action.

thanks for the support,
Chandra

brendandonhue
07-11-2003, 10:14 AM
Lest see your code, both Khalid's method and mine work fine.