Open Popup Window via VB Code

Discussion in 'ASP .Net' started by Lou Civitella, Jul 12, 2006.

  1. I have an asp:Button on my page. The buttons OnClick event runs some code. I
    would like to have it also open a popup window.
    Is this possible and how do I go about doing this?

    Thanks,
    Lou
     
    Lou Civitella, Jul 12, 2006
    #1
    1. Advertising

  2. a "Popup Window" is done client side with script, via window.open method.
    There are dozens of javascript and HTML DOM references online where you can
    find sample code. Would not, however, recommend you do this with VBScript -
    use javascript instead.
    Peter

    --
    Co-founder, Eggheadcafe.com developer portal:
    http://www.eggheadcafe.com
    UnBlog:
    http://petesbloggerama.blogspot.com




    "Lou Civitella" wrote:

    > I have an asp:Button on my page. The buttons OnClick event runs some code. I
    > would like to have it also open a popup window.
    > Is this possible and how do I go about doing this?
    >
    > Thanks,
    > Lou
    >
    >
    >
     
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=, Jul 12, 2006
    #2
    1. Advertising

  3. Lou Civitella

    John Prado Guest

    You can attach a javascript function to your button

    button.attributes.add("onclick", "window.open(...)")


    Peter Bromberg [C# MVP] wrote:
    > a "Popup Window" is done client side with script, via window.open method.
    > There are dozens of javascript and HTML DOM references online where you can
    > find sample code. Would not, however, recommend you do this with VBScript -
    > use javascript instead.
    > Peter
    >
     
    John Prado, Jul 13, 2006
    #3
  4. Lou Civitella

    luckyjack69

    Joined:
    Mar 5, 2008
    Messages:
    1
    The question was how do you in VB script not JScript

    Why do people give such rubbish answers? The question was not how to open a window in JScript or any thing else but VBScript.

    Easy to do

    There are a few ways using VBScript here is one that is simple and effective.

    Window.Open "http://www.yoursite.yourdomain", "Window1", "Toolbar=No", "Menubar=No", "Scroolbar=No"

    If you want the toolbar, menubar and or scroolbar you know what to do.

    Jack

     
    luckyjack69, Mar 5, 2008
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jens Peter Hansen
    Replies:
    7
    Views:
    544
    Randy Webb
    Jun 19, 2004
  2. Raffi
    Replies:
    4
    Views:
    229
    Dr John Stockton
    Aug 12, 2004
  3. Ashish
    Replies:
    2
    Views:
    191
    Richard Cornford
    Oct 31, 2004
  4. Berlin  Brown

    Selection; open popup or open a new window

    Berlin Brown, Jun 26, 2006, in forum: Javascript
    Replies:
    0
    Views:
    118
    Berlin Brown
    Jun 26, 2006
  5. Jimmy
    Replies:
    1
    Views:
    325
    Thomas 'PointedEars' Lahn
    Oct 6, 2007
Loading...

Share This Page