Click here to Skip to main content
15,908,274 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi Friends,
I want to check internet explorer 8 popup blocker is enabled or not using javascript in my application?Please don't post any url.
Please reply asap.
i'm using this code please check and modify once.
JavaScript
<head runat="server">
    <title>Untitled Page</title>
    <script type="text/javascript" language="javascript">
        winHandle=window.open("","","")
        if(winHandle==null){
            alert("Error: While Launching New Window...nYour browser maybe blocking up Popup windows. nn Please check your Popup Blocker Settings");
         }
    </script>
</head>

this code is working in ie9 version and other browsers also.but i want check popup blocker in previous versions of internetexplorer.can any body help me.


Thanks & Regards
Hari
Posted
Updated 19-Sep-12 20:57pm
v2

1 solution

What's wrong with posting url's? A good url might give you more than just a solution.

And what exactly is not working with your code? Since this is the way to do it. Put an alert(winHandle); after window.open statement and you will see what to check. You will find that not only null-s will be returned. So expand your conditions:
JavaScript
if(typeof(winHandle)==='undefined' || winHandle==null )
 
Share this answer
 
v2
Comments
Hari Krishna Prasad Inakoti 20-Sep-12 3:35am    
this is also not working in my browser(Internet explorer 8)
Zoltán Zörgő 20-Sep-12 3:36am    
And what is alert(winHandle); giving you?
Hari Krishna Prasad Inakoti 20-Sep-12 3:40am    
alert("Error: While Launching New Window...nYour browser maybe blocking up Popup windows. nn Please check your Popup Blocker Settings");.

i didn't get alert message in my ie browser it is working in other browsers.
Zoltán Zörgő 20-Sep-12 3:42am    
No! Have you read what I wrote?
Pun a alert(winHandle) after the window creation row, and see what's showing.
Hari Krishna Prasad Inakoti 20-Sep-12 3:43am    
i did like that.but result same

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900