xaverian
10-10-2012, 08:03 AM
Hi,
In my javascript function document.form.action is not working in Internet Explorer but in Firefox.
Please help to make it work on both browsers.
Thanks.
shyagrawal
10-10-2012, 08:38 AM
you can try this.
document.forms.namedItem("formName").setAttribute( "attribute","value", true/false);
Philip M
10-10-2012, 09:40 AM
document.formname.action should work in all browsers. So does
document.forms[0].action = "whateverURL";
or
this.form.action = "whateverURL";
Check you do not have a form field named "action". If you do rename that field.
All advice is supplied packaged by intellectual weight, and not by volume. Contents may settle slightly in transit.
xaverian
10-10-2012, 10:31 AM
Philip,
Thanks. You are right. It works on all browser. I had a form field with the name 'action' hence faced the problem. Just renamed it and it starts working.