chandu2708
06-02-2009, 03:13 PM
Hi Coders,
Cpuold somebody help me on following case, what im trying to do here is create a dynamic hidden iframe and write a form into it and submit. this approach works in FireFox but not in IE7, below is the code im using
document.forms[form].appendChild(isProcessFQ);
var ifText = document.getElementById(rootElID).innerHTML;
var ifSubmit = document.createElement('iframe');
var ifSubmitID = 'inf-fq-process-' + sessionID;
ifSubmit.setAttribute('id',ifSubmitID);
ifSubmit.setAttribute('name',ifSubmitID);
ifSubmit.setAttribute('style','display: none');
document.getElementById(rootElID).appendChild(ifSubmit);
if(ifSubmit.contentDocument) {
doc = ifSubmit.contentDocument;
}else
if(ifSubmit.contentWindow) {
doc = ifSubmit.contentWindow;
}else
if (ifSubmit.document) {
doc = ifSubmit.document;
}
doc.open();
doc.write(ifText);
doc.close();
doc.forms[0].submit();
But when i run this in IE7 its openings a new blank window after the statement doc.open(); and shows some error(which has no useful details) and not maing any calls to server.
could somebody tell me how to fix this behaviour please.
Thank you,
bala.
Cpuold somebody help me on following case, what im trying to do here is create a dynamic hidden iframe and write a form into it and submit. this approach works in FireFox but not in IE7, below is the code im using
document.forms[form].appendChild(isProcessFQ);
var ifText = document.getElementById(rootElID).innerHTML;
var ifSubmit = document.createElement('iframe');
var ifSubmitID = 'inf-fq-process-' + sessionID;
ifSubmit.setAttribute('id',ifSubmitID);
ifSubmit.setAttribute('name',ifSubmitID);
ifSubmit.setAttribute('style','display: none');
document.getElementById(rootElID).appendChild(ifSubmit);
if(ifSubmit.contentDocument) {
doc = ifSubmit.contentDocument;
}else
if(ifSubmit.contentWindow) {
doc = ifSubmit.contentWindow;
}else
if (ifSubmit.document) {
doc = ifSubmit.document;
}
doc.open();
doc.write(ifText);
doc.close();
doc.forms[0].submit();
But when i run this in IE7 its openings a new blank window after the statement doc.open(); and shows some error(which has no useful details) and not maing any calls to server.
could somebody tell me how to fix this behaviour please.
Thank you,
bala.