Popup Problem

pisoftwar

Newcomer
Joined
Feb 22, 2004
Messages
6
Good day,
I have a slight problem with a site I have developed.
I have a report being generated to a new browser by using the following code
Response.Write("<script language='javascript'> window.close();window.open('" & Url & "',null, ''); </script>")
The problem is that Zone alarm pro and the like are blocking the page from comming up because it thinks it is a popup.
Is there another way to achieve this ?
 
anything thats opened using window.open is treated as a popup and the pop up blocker will try to block that.

The options could be disabling the pop up blocker for some time.

I am not sure if using window.ShowModelessDialogBox will serve your purpose.
 
Have you looked at RegisterScriptBlock?

I have found that (a) this will pop up through many of the pop-up blockers and (b) has a method to determine if the window is blocking scripts, giving you the option to post something saying, "Hey - you need to accept my pop-ups in order to proceed"

Code:
        Dim sWindow As String = "mywindow"
        Dim x As Integer
        Dim y As Integer
        Dim glob As globVars

        glob = globVars.GetInstance
        glob.sRetField = "btnCheckIn"
        x = glob.iScreenHeight * 0.3
        y = glob.iScreenWidth * 0.45

        Dim jscript As String = "<script language='JavaScript'>mywindow = window.open('./CalPopUp.aspx','" + _
            sWindow + "','width=265px,height=208px,toolbars=no,resizable=no,top=" & x & ",left=" & y & "')</script>"
        ClientScript.RegisterClientScriptBlock(Me.GetType, "CallServer", jscript)

This example also puts the window in a specific place, so you can cut out anything to do with the glob
 
Back
Top