;

PDA

Click to See Complete Forum and Search --> : Remote Window Problem


macentyre
07-01-2002, 07:45 PM
Hey guys...I can't figure this out..

I need to make this popup window image link point to the window behind itself...I keep trying to find these remote scripts but all of them have scripts that start with a window.open function and I already have that programmed...I need just the script to make the links within the popup to change the "main" browser window beneath. Here's a link to the site I'm trying to make this happen at. When the popup window comes up I need the "Order Now" graphic link to change the background main window to the order page....how is this done...I'm going nuts!! Check out my scripts within the main window at:

http://www.activemailorder.com

the "order now" link is within the popup window on the first page that comes up: index.html

THanks for any help!!!

aversion
07-01-2002, 07:50 PM
what script are using on that link?

the window that opened that popup will be refered to as 'opener' for obvious reasons, so have you tried

<a href="javacript: opener.location.href='yourorderpage.htm'">

yet?
[Edited by aversion on 07-01-2002 at 06:56 PM]

macentyre
07-01-2002, 07:53 PM
I don't know enough about javascript yet to know what your talking about.

aversion
07-01-2002, 07:58 PM
sorry :)

your graphic in the popup window has a link attached yes?

put that above code in the <a> tag that defines that link for your graphic and change the url to the url you want to appear in the main window.

then when you click the graphic on the popup that url will open in the main window.

try it ;)

macentyre
07-01-2002, 08:23 PM
I did that and it said invalid syntax error...it didn't open it in the other window either...I'm using an image map also here's what it is:
<map name="Map">
<area shape="rect" coords="238,70,326,106" href="flipstart2.html">
<area shape="rect" coords="6,41,106,61" href="javacript:opener.location.href='www.activemailorde r.com/goshoppingset.html">
</map>

I think where it says href='whatever' the ' is changing itself to %27

aversion
07-01-2002, 09:08 PM
it should be 'javascript' not 'javacript', my typo in the original post

try that

macentyre
07-01-2002, 09:26 PM
This is going to sound really stupid but how do I name my original window that it's popping out of?..with a script? What is it?

Much thanks!!

aversion
07-01-2002, 09:54 PM
the original window that spawned the popup is always called 'opener'


:)

macentyre
07-01-2002, 10:03 PM
yes...but how do you label it?

aversion
07-01-2002, 10:22 PM
your code should look like this:

<map name="Map">
<area shape="rect" coords="238,70,326,106" href="flipstart2.html">
<area shape="rect" coords="6,41,106,61" href="javascript: opener.location.href='www.activemailorder.com/goshoppingset.html">
</map>

you refer to the original window's url thus

opener.location.href="someurl.htm"

there's no need to label it other than calling it 'opener' though you can, just not sure how that would work.

macentyre
07-02-2002, 02:04 PM
I finally got it to work the way I wanted it to...thanks for all your help man! you rock!

Thanks again!

aversion
07-02-2002, 05:03 PM
glad it worked out.

:)