Pop up from Pop up
I need to create a pop-up window from the the window created by this script, let's call it pop-up A. I have put the same function (renamed) in Pop-up A to create Pop-up B, but it just loads the new page in the existing pop-up window.
<script LANGUAGE="JavaScript">
= 4) { win.window.focus(); }
}
// End -->
</script>
How do I create a new seperate window?
Thanks!!!
- Mike
Blessed is the man who fears the LORD, who delights greatly in his commandments. Psalms 112:1
Jack Michaelson posted this at 20:33 — 24th October 2001.
He has: 1,733 posts
Joined: Dec 1999
Hey Mike,
Be sure to have different values for 'myname' on both pages.
Besides that: when both windows have the same width and height it may look like the new page is loaded in the existing popup because your popup script centers the window . In fact, the new window is placed in top of the old one... sounds stupid, but when I tested your script it fooled me that way for a moment
Hope it helps,
[edit] Oh look! Post number 500 for me [/edit]
Shakespeare: onclick || !(onclick)
mycoolross posted this at 21:27 — 24th October 2001.
They have: 82 posts
Joined: Oct 2001
Jack Congratulations on your number of posts !!!
However I think you will get the opportunity to post another one.
When I run this script it just loads the new page in the existing pop-up window.
I have modified the script within the pop up, the function has been renamed and the sizes are different.
Thanks,
Mike
Blessed is the man who fears the LORD, who delights greatly in his commandments. Psalms 112:1
Jack Michaelson posted this at 07:37 — 25th October 2001.
He has: 1,733 posts
Joined: Dec 1999
Can you please tell me how you call the function on both pages?
mycoolross posted this at 15:03 — 25th October 2001.
They have: 82 posts
Joined: Oct 2001
Here are three test pages:
TestPopup.htm:
<script LANGUAGE="JavaScript">
= 4) { win.window.focus(); }
}
// End -->
</script>
Pop up Window 1
_________________________________________________________
TestPopUp1.htm:
<script LANGUAGE="JavaScript">
= 4) { win.window.focus(); }
}
// End -->
</script>
Pop up Window 2
____________________________________________________________
TestPopUp2.htm
We made it!!!
_______________________________________________________
This opens a new window with a link saying open popup
but it just loads the new page in the existing popup.
Thanks!!!
- Mike
Blessed is the man who fears the LORD, who delights greatly in his commandments. Psalms 112:1
Vincent Puglia posted this at 15:15 — 25th October 2001.
They have: 634 posts
Joined: Dec 1999
Hi Mike,
You still have the same 'myname' variable; it needs to be different.
win = window.open(mypage, myname, winprops)
'name','600','525','no');return false;">Pop up Window 2
'name2','600','525','no');return false;">Pop up Window 2
also, it would be better if you gave the windowHandles different values:
win1 = window.open.....in page1
win2 = window.open.....in page2
renaming the function itself is immaterial since javascript will always assume you are referring to the focused window, unless specifically told something else. That is:
NewWindow() & opener.NewWindow() & win.NewWindow() are distinct references.
Vinny
Where the world once stood
the blades of grass cut me still
Jack Michaelson posted this at 08:04 — 26th October 2001.
He has: 1,733 posts
Joined: Dec 1999
I rest my case
mycoolross posted this at 14:40 — 26th October 2001.
They have: 82 posts
Joined: Oct 2001
Vincent, Jack,
Thanks guys! It works!
I changed the name variable. I guess I should learn javascript. Much to the chagrin of Peter J. Boettcher I have been using vbscript for all my client side stuff.
Thanks!
- Mike
By the way guys the time is wrong on this post. It says 3:40 P.M. and it should be 9:40 A.M. I think there might be a problem with the timestamp.
Blessed is the man who fears the LORD, who delights greatly in his commandments. Psalms 112:1
Vincent Puglia posted this at 15:00 — 26th October 2001.
They have: 634 posts
Joined: Dec 1999
Hi Mike,
old, but good online tutorials: htmlgoodies.com
vbscript?? aargh!!
Vinny
Where the world once stood
the blades of grass cut me still
mycoolross posted this at 15:02 — 26th October 2001.
They have: 82 posts
Joined: Oct 2001
It was a controlled environment, and it worked great!
By the way GrassBlade: cut&paste javascript is unavailable.
Thanks,
- Mike
Vincent Puglia posted this at 21:41 — 26th October 2001.
They have: 634 posts
Joined: Dec 1999
Hi Mike,
Glad you're interested Unfortunately, lately the aol server is not among the best. If I ever get some money up, I'll put up my own server; but till then...if it happens again, hit reload/refresh -- it usually comes up on the second try.
Vinny
Where the world once stood
the blades of grass cut me still
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.