I have set action attribute to "TestMyPage.ashx"
During runtime, FireFox converts action attribute to full url
containing protocol, host name, virtual dir. name and page name.
It is expected that FireFox should load the url in action attribute
on submit when it have the full url.
But when I add the form object to frame, it converts the action
attribute to "TestMyPage.ashx". I don't know what is causing this.
Because action attribute now has page name only, it can not load
the page (it do not have full url now).
Code for FireFox:
this.innerDocument = document.getElementById('MYFRAME').contentWindow.document;
var _form = document.createElement('form');
_form.id = 'MYFORM';
_form.name = 'MYFORM';
_form.method = 'post';
_form.enctype = 'multipart/form-data';
_form.action = 'TestMyPage.ashx';
attribute is converted to page name only ...?.
When this is done for IE, during runtime it shows full url in action
attribute, so it loads the page successfully.
But FireFox is converting url to page name in action attribute.
Code for IE:
var _form = this.innerDocument.createElement('<form id = "MYFORM"
method="post" enctype="multipart/form-data" action="ImportHandler.ashx" />');
var formHTML = _form.outerHTML;
document.getElementById('MYFRAME').contentWindow.document.body.innerHTML = formHTML;
Can anybody suggest what is the problem for such behavior.
Any guesses are welcome.
Software Engineer, Pune