Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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 ?

Posted

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"

 

       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

Read the Fovean Chronicles

Because you just can't spend your whole day programming!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...