Reputation: 3057
I have a page with an iframe in it.
The iframe hold a gridex grid that listens to the double click event.
On double click this is what happens:
function OpenOrderInfo(grid, x, y)
{
if(window.event != null)
{
var r = window.event.srcElement;
while(r != null && r.tagName != "TR")
r = r.parentElement;
if(r == null || r.className == "")
{
return;
}
}
if(grid != null)
{
var row = grid.getSelectedItems().getSelectedItemInIndex(0).getRow();
if(row != null && row.getRowType() == "Record")
{
document.getElementById('hdnSelectedIndex').value = row.getPosition();
var UID =row.getCellByColumnKey("UID").getValue();
var OrderNum = row.getCellByColumnKey("PurchaseOrderNumber").getValue();
var CustomerID = row.getCellByColumnKey("CustomerSiteID").getValue();
var ReadFlag = row.getCellByColumnKey("ReadFlag").originalImage;
var VendorID = row.getCellByColumnKey("VendorSiteID").getValue();
var IsHistoricalPO = row.getCellByColumnKey("IsHistoricalPO").getValue();
var randNum = new Date().getTime();
window.open('', 'OrderInfoWin' + randNum, 'channelmode=no,directories=yes,fullscreen=no,height=670,location=no,menubar=no,resizable=yes,width=860,scrollbars=yes,status=yes,titlebar=no,top=5');
var myform = document.createElement('form');
myform.action = "OrderInfo.aspx";
myform.method = "post";
myform.target = "OrderInfoWin" + randNum;
myform.style.display = "none";
var myinp1 = document.createElement('input');
myinp1.id="myinp1";
myinp1.name="UID";
myinp1.type="hidden";
myinp1.value="";
var myinp2 = document.createElement('input');
myinp2.id="myinp2";
myinp2.name="OrderNum";
myinp2.type="hidden";
myinp2.value="";
var myinp3 = document.createElement('input');
myinp3.id="myinp3";
myinp3.name="CustomerID";
myinp3.type="hidden";
myinp3.value="";
var myinp4 = document.createElement('input');
myinp4.id="myinp4";
myinp4.name="ReadFlag";
myinp4.type="hidden";
myinp4.value="";
var myinp5 = document.createElement('input');
myinp5.id="myinp5";
myinp5.name="VendorID";
myinp5.type="hidden";
myinp5.value="";
var myinp6 = document.createElement('input');
myinp6.id = "myinp6";
myinp6.name = "IsHistoricalPO";
myinp6.type = "hidden";
myinp6.value = "";
myform.appendChild(myinp1);
myform.appendChild(myinp2);
myform.appendChild(myinp3);
myform.appendChild(myinp4);
myform.appendChild(myinp5);
myform.appendChild(myinp6);
document.body.appendChild(myform);
document.getElementById('myinp1').value=UID;
document.getElementById('myinp2').value= OrderNum;
document.getElementById('myinp3').value=CustomerID;
document.getElementById('myinp4').value=ReadFlag;
document.getElementById('myinp5').value=VendorID;
document.getElementById('myinp6').value = IsHistoricalPO;
myform.submit();
document.body.removeChild(myform);
}
}
}
This method opens a popup window and submits the form into it.
The order Info should appear.
For some unknown reason I sometime get this page:
Which in turn goes to this page:
I have debugged the method and it seems I am getting to the submit part, but nothing happens after it.
I have used fiddler to try and see if a request is being made and it seems no request is leaving the browser.
The process is creating a temp form setting its target to a new popup window and submitting it.
Upvotes: 0
Views: 1322
Reputation: 3057
I have found my problem, I had another process going on in the background of the page that reports analytic data on the site users using ajax.
for some reason this process is causing the browser to stuck after a few opening and closing the window, must be something with an unhandeled ajax request issue.
after disabling it I never saw the problem again.
thanks
Upvotes: 0
Reputation: 27307
As far as I remember correctly, Internet Explorer needs to have the form attached to the document (a part of the DOM) in order to submit it.
Upvotes: 1