Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to turn-off popup blocker in jsp

Status
Not open for further replies.

jollyplay

Programmer
Dec 16, 2003
90
Hi

I have to turn-off popup blocker in my jsp page. I am calling the popup window in body tag using onload event. The popup blocker is blocking the popup window. We can manually turn-off the popup block by Tools menu. But the user dont know how to do it. Kindly provide me a link or code for this.

Thanks in advance.
 
JSP runs serverside - there is no way to do what you want via JSP.
Furthermore, popups are seriously annoying and you should avoid them - this is why popup blockers exist - because people can't stand popups !

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
Thanks for your reply but still I'm confused.

I'm using javascript to display the popup window in my jsp page. Is there any other way to display the popup window.

Thanks in advance.
 
Well javascript isn't JSP is it ?

In any case :

popups are seriously annoying and you should avoid them - this is why popup blockers exist - because people can't stand popups !

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
I had a similar situation, at I was able to see if there is a popup blocker available and let the user Know about it.

This can be done using javascript, see code below.

<script language="JavaScript" type="text/javascript">

function IsPopupBlocker() {
var oWin = window.open("","testpopupblocker","width=100,height=50,top=5000,left=5000");
if (oWin==null || typeof(oWin)=="undefined") {
return true;
} else {
oWin.close();
return false;
}
}

function genPopup(){
if (IsPopupBlocker()) {
alert("Please disable pop-up blocker in your computer");
top.window.frames[1].location="/tech_view_footer.jsp";
} else{
// alert("popupNO");
document.formName.<%=ActionController.ACTION%>.value='GeneratePopUp';
document.formName.submit();
top.window.frames[1].location="/tech_view_footer.jsp";
}
}
function proceed(){
document.formName.<%=ActionController.ACTION%>.value='UpdateTechView';
document.formName.submit();
}
</script>
 
You can search the javascript forum for this, there are plenty of sollutions for this.

But the idea is that, unless you have a limited set of users you can control, the popup blocker is just up to them.

Cheers,
Dian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top