Hey guys, I had a problem here, hope you all can help me solve! Scenario: Have a table of hyperlink names. Each click on a name will cause a javascript code to run. This javascript code will display the name in a new window. Problem: When I click on each name,
a new window pop up. I wish to have the name displayed on the same 1st window that it create. Code for javascript: With Response .Write("<script language='JAVASCRIPT'>") .Write("win = window.open('','','width=320,height=240,left=400,top=100');") .Write("win.document.write('\n')")
.Write("win.document.write('\n')") .Write("win.document.write('\n')") .Write("win.document.write('Name : " & strName & "
\n')") .Write("win.document.write('\n')") .Write("win.document.write('')") .Write("<" & "/script>" & vbCrLF) End With Question: Is there any way I can use ASP.NET to store the content of the win in the Javascript code block? Thanks a lot in advance!
How about added a little bit more code in your JavaScript? Before it open the new window check whether win already exist. If yes, close it and then open the new window. Something like this:
yong2579
Member
20 Points
4 Posts
How to Open a Page in same new window
Mar 17, 2004 03:11 PM|LINK
\n')") .Write("win.document.write('\n')") .Write("win.document.write('')") .Write("<" & "/script>" & vbCrLF) End With Question: Is there any way I can use ASP.NET to store the content of the win in the Javascript code block? Thanks a lot in advance!
chunshahab
Contributor
2509 Points
501 Posts
Re: How to Open a Page in same new window
Mar 17, 2004 04:57 PM|LINK
if(window.win) { win.close(); }Hope this helps.Live Without Regret
stiletto
All-Star
16995 Points
3304 Posts
Re: How to Open a Page in same new window
Mar 18, 2004 02:13 AM|LINK
yong2579
Member
20 Points
4 Posts
Re: How to Open a Page in same new window
Mar 18, 2004 03:02 AM|LINK