Forum Moderators: open

Message Too Old, No Replies

How to show a popup window from another asp page?

         

srivalli9

3:22 pm on Dec 30, 2003 (gmt 0)

10+ Year Member



Hi .
I have 3 asp pages.
A link in the first one creates a popup window.
A link in the popup window opens a page with 2 frames in it, top and bottom.
Now, I have a link in bottom frame of this page, which, when clicked , should give focus to the existing popup window.

When creating the popup window, I used a reference to it like...
newwin=window.open(...)
I tried to pass this newwin as QUERYSTRING to all other ASP pages.
And in the last page, i.e.,bottom frame page, I used the code like..
popup.focus() ---------- *
where popup is set to querysttring variable.... Request.QueryString("popupwindowreference")

The above procedure didnt work. it thows an error like...popup is undefined at line *

Can anyone figure out what the problem is?
Any help is grately appreciated!

Thanks you.
-Srivalli.

korkus2000

6:42 pm on Jan 13, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



When creating the popup the JS variable created dies at the end of that pages life, but you give that window a name when you create it.

window.open('file.htm', nameofpopup, 'properties');

Reference the nameofpopup. If you open a new window with this name on anypage from the same window of the site and it will over right the windows contents. Try:

nameofpopup.window.focus();

All though I don't know how supported window.focus is cross browser.

srivalli9

11:26 pm on Jan 13, 2004 (gmt 0)

10+ Year Member



thnaks a lot korkus2000 for ur suggestion....
it worked for me when i used the same window name.

-srivalli