PDA

View Full Version : pop-out window


reiji
10-14-2003, 10:11 AM
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

bruce
10-14-2003, 11:30 AM
You'll need to use Javascript to do that.

[b]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">

AllanS
10-20-2003, 01:11 AM
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

reiji
11-03-2003, 09:10 AM
Thank you Allan.

- reiji