Results 1 to 3 of 3

Thread: Opening a new window

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2001
    Location
    Denmark
    Posts
    1,049

    Opening a new window

    When I use the code below my Windows XP OS blocks the new window. Is there a way to prevent this?

    The code is written in vb.net:
    Code:
    Sub openNewWindow()
            Dim strScript As String = ""
            strScript = "<script>"
            strScript = strScript & "var winName= '';"
            strScript = strScript & "var w;"
            strScript = strScript & "var winFeatures = 'width=520,height=640,top=0,left=0,status,scrollbars';"
            strScript = strScript & "var winURL = 'http://www.vbdotnet.dk/abbreviations.aspx';"
            strScript = strScript & "w = window.open(winURL,winName,winFeatures);"
            strScript = strScript & "</script>"
            'Allows the alert box to be shown without wiping the controls off the page.
            Page.RegisterStartupScript("ClientScript", strScript)
        End Sub

  2. #2
    No place like 127.0.0.1 eyeRmonkey's Avatar
    Join Date
    Jul 2005
    Location
    Blissful Oblivion
    Posts
    2,306

    Re: Opening a new window

    It probably has something to do with the fact that it is done through VB. If you wrote it directly to the HTML document then let the HTML document execute normally, it would probably open.
    Visual Studio 2005 Professional Edition (.NET Framework 2.0)
    ~ VB .NET Links: Visual Basic 6 to .NET Function Equivalents (Thread) | Refactor! (White Paper) | Easy Control for Wizard Forms | Making A Proper UI For WinForms | Graphics & GDI+ Tutorial | Websites For Free Icons
    ~ QUOTE: Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rich Cook

    ~ eyeRmonkey.com

  3. #3
    Fanatic Member kaihirst's Avatar
    Join Date
    Jul 2005
    Location
    The Resaurant At the End of The Universe
    Posts
    633

    Re: Opening a new window

    Hi,

    Its go nothing to do with the code at all. The code is actually pretty good indeed (wwell done. very iffiicient.) It is internet exporer that is blocking the pop up, disable this adn see what happens. If you still avhe any other problems, shout and will write code fo this operation in another language for you.

    ta

    kai
    As the information I give is useful in its nature, consider using the RATE POST feature located on the bottom left of this post please..

    A few things that make a good Developer a Great One.
    Methodical and a thorough approach to research and design inevitably leads to success.
    Forward thinking is the key to Flow of control.
    Never test in the design environment, always test in real time, you get the REAL results.
    CBSE & OOSE are the same animal, they just require different techniques, and thinking.
    SEO is a globe of objectives, SE rankings is an end to a means for these objectives, not part of them.
    The key to good design is explicit attention to both detail and response.
    Think Freely out of the "Box" you're in..... You will soar to better heights.

    Kai Hirst - MSCE, MCDBA, MCSD, MCP, MCAP, MSCT


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