pop-out window

Discussion in 'ASP.NET / ASP.NET Core' started by reiji, Oct 14, 2003.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. I'd like to make a pop-out window similar to the signature preview window used for this forum registration. Could anyone tell me how to do it in VB.NET?

    - reiji
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    You'll need to use Javascript to do that.

    quote:Originally posted by reiji

    I'd like to make a pop-out window similar to the signature preview window used for this forum registration. Could anyone tell me how to do it in VB.NET?

    - reiji
    </blockquote id="quote"></font id="quote">
     
  3. Here's what I use:

    To open a new browser instance (child), call this function with the address of the web page to be opened and the title:

    Sub Nav2NewWindow(ByVal sURL As String, ByVal sTitle As String)
    Dim sScript As String
    sScript = "<script language='javascript'>"
    sScript += "window.open('"
    sScript += sURL
    sScript += "','"
    sScript += sTitle
    sScript += "','toolbar=0, location=0, directories=0, menuBar=0, scrollbars=1,resizable=1, width=700, height=600, left=50, top=50');"
    sScript += "</script>"
    Page.Response.Write(sScript)
    End Sub



    To update a couple of text boxes on the parent page:

    Dim sScript As String
    sScript = "<script language='javascript'>"
    sScript += "window.opener.frmMain.txtCaseId.value=" & lCaseId.ToString & ";"
    sScript += "window.opener.frmMain.txtCaseNo.value='" & strCaseNo & "';"
    sScript += "</script>"
    Response.Write(sScript)


    To close the child:

    Sub CloseCurrent()
    Dim sScript As String
    sScript = "<script language='javascript'>"
    sScript += "window.close();"
    sScript += "</script>"
    Response.Write(sScript)
    End Sub




    Allan Sieker
    Eureka, MO
     
  4. Thank you Allan.

    - reiji
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page