document.forms.action = "/CordellSearchProject/SubmitIt.do?filename=" + filename;
document.forms.name = "searchForm";
Its working fine in every browser(IE 9, Firefox,Chrome), but in IE 8 its throwing an error "Object doesn't support this property or method"
Please help, any kind of help would be appreciated.
Thanks for your reply...
but how to make form id in <html:form method='post' action="/searchAction.do">
when I add it as <html:form id="searchForm" name="searchForm" method='post' action="/searchAction.do">
Its giving below error:
Attribute id invalid for tag form according to TLD
we can add <html:form styleId="formId" method='post' action="/searchAction.do">
but on document.getElementById[formId].action, its giving error as null on formId....
I think its because of formName is not mentioned in htm:form tag....
Do anybody know how to add formname in html:form tags
You don't neen a name. All you need is an id. I've already told you how to do it. Assign an id to the form element and use document.getElementById() to get a reference to the form element. Or use jQuery.
Worrying about names and such is a waste of your time.
subject: Object doesn't support this property or method