Response.Write("<script language='javascript'>alert(window.opener.location.pathname); if(window.opener.location.pathname.toString() == \"/page.aspx\"){window.opener.document.forms[0].submit();}</script>");
This works in Chrome, but in IE I get a mass javascript runtime error saying location is null, seems its somehting to do with opener.
What is the equivalent in IE?
You should never use
Response.Writeto add JavaScript to the page. View the page source and you will see that the script is added before any of the HTML markup on the page. That is bad.You should be using
RegisterStartUpScript.