Results 1 to 2 of 2

Thread: javascript hustling me...

  1. #1

    Thread Starter
    Banned jhermiz's Avatar
    Join Date
    Jun 2002
    Location
    Antarctica
    Posts
    2,492

    javascript hustling me...

    ASP.net application...need to open a reports popup window...
    tried this:

    Code:
        Private Sub OpenReports(ByVal strURL As String, ByVal strName As String, ByVal strAtt As String)
            Response.Write("<script language='JavaScript'>")
            'Response.Write("self.name = 'main';")
            Response.Write("x=window.open('" & strURL & "', '" & strName & "','" & strAtt & "');")
            Response.Write("</script>")
        End Sub
    And passed it the url and a name and any attributes (Width, height, etc).
    Works fine HOWEVER, it places the window under the application, I want it to pop on top of the application.

    The window should be noticeable (opened in the front) so the user knows what to do. It should not be placed under the web app so that the user has to minimize just to see it.

    Jon

  2. #2
    Frenzied Member axion_sa's Avatar
    Join Date
    Jan 2002
    Location
    Joburg, RSA
    Posts
    1,724

    Re: javascript hustling me...

    Code:
    Private Sub OpenReports(ByVal strURL As String, ByVal strName As String, ByVal strAtt As String)
            Response.Write("<script language='JavaScript'>")
            Response.Write("x=window.open('" & strURL & "', '" & strName & "','" & strAtt & "');")
            Response.Write("if (x != null)")
            Response.Write("	x.focus();")
            Response.Write("else")
            Response.Write("	alert('Popup blocker...');")
            Response.Write("</script>")
    End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width