Hi all,
I am trying to write JS code for detecting pop-up blocker.and it works good
in IE but neither works in firefox(win), firefox(mac), nor safari(win and
mac OS).
Can anyone help me how I can do this?
Code is:
<html>
<head>
<script type="text/javascript">
function detectPopupBlocker()
{
var test = window.open("page1.html","title", "width=100,height=100");
alert(test);
return false;
if(test)
{
//test.close();
alert("Pop-ups not blocked.");
}
else
{
alert("Pop-ups blocked.");
}
}
</script>
</head>
<body>
<table>
<tr>
<td><a href="page1.html" target="_blank">TEST LINK</a></td>
</tr></table>
Click Test button to detect pop-up blocker
<form>
<input type="button" onclick="detectPopupBlocker()" value="Test">
</form>
</body>
</html>
thanks in advance
Dave Anderson - 02 Jul 2008 20:04 GMT
> I am trying to write JS code for detecting pop-up blocker.and it
> works good in IE but neither works in firefox(win), firefox(mac), nor
> safari(win and mac OS).
>
> Can anyone help me how I can do this?
return prompt("Does your browser block popups windows?")

Signature
Dave Anderson
Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.
jyoti - 03 Jul 2008 21:40 GMT
> > I am trying to write JS code for detecting pop-up blocker.and it
> > works good in IE but neither works in firefox(win), firefox(mac), nor
[quoted text clipped - 9 lines]
> Unsolicited commercial email will be read at a cost of $500 per message. Use
> of this email address implies consent to these terms.
yes, firefox do for all other sites which opens a pop-up .
Thanks in Advance