Hi all
I have a large application written for IE6 using ASP. Yep, I know, don’t ask, but it’s done and live and has a very small vertical user base.
The client now wants it to work with Mozilla, in fact we are considering a port of the whole app. One feature of IE6 I can’t replicate here is to to with (yep, you guessed it) popups.
The following code works fine in IE6 but not in Mozilla, I assume that this is because Mozilla does not allow popups to be created from the onload function. There are various reasons why the code looks like this, too complex to go into at this stage.
Any comments, can anyone confirm?
Thanks
FG
Copy this lot to TestMoz.asp
<% sVal1 = request.form(“frmTest1”) %>
<html>
<head>
<title>Test Mozilla</title>
<script language=”JavaScript”>
function fTest1(){
document.f.frmTest1.value=”Test1″;
document.f.submit();
}
function fTest2(){
document.f.frmTest1.value=”Test2″;
document.f.submit();
}
var sVal1 = “<% =sVal1 %>”;
function init(){
if (sVal1 == “Test2”){
var oPopup = window.open(“Popup.asp”,”Popup”,””);
oPopup.focus();
//alert(oPopup);
}
}
window.onload=init;
</script>
</head>
<body>
sVal1 = <% =sVal1 %><br />
<form action=”TestMoz.asp” method=”post” name=”f”>
<input name=”frmTest1″ type=”hidden”>
<br />
<a href=”javascript:fTest1()”>test 1 submit</a>
<br />
<a href=”javascript:fTest2()”>test 2 submit</a>
<br />
</form>
</body>
</html>