On Load, Open small window with Hyperlink back to first window

D

DaveO

Hi All.

Not sure what direction to go in for this.

I need the following :

when page1.htm opens, also open page2.htm ( size = 200 x 200 )

page2.htm has 1 image, hyperlinked to page3.htm

When page2's image is clicked, Close page2.htm and load page3 in the first
window ( where page1.htm currently is )

Any ideas.

Regards
Dave
 
J

Jon Spivey

Easy enough to do but your users might not like it, however
On page 1
<body onload="window.open('page.htm','somename','width=200,height=200');"
On the image link on Page 2
<a href="javascript:;" onclick="self.opener.location.href='page3.htm';
this.close();">...image...
 
D

DaveO

Hi Jon

Many thanks for the code -- works like a dream.

ps. I had to change the this.close() to me.close()

Now I'm trying to get fancy ---- any suggestions on how I can ensure that
the 'popup' window only appears the first time I load my index.htm page (
ie. not to appear again if the browser is refreshed ) ?

Regards
Dave
---------------------------------------------------
Easy enough to do but your users might not like it, however
On page 1
<body onload="window.open('page.htm','somename','width=200,height=200');"
On the image link on Page 2
<a href="javascript:;" onclick="self.opener.location.href='page3.htm';
this.close();">...image...
 
S

Steve Easton

Won't XP with SP2 block the body onload ??

--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
........................with a computer
 
D

DaveO

Hi Steve

I am using XP sp2 with Nortons Internet Security - works fine.

DaveO
---------------------------------------------------

Won't XP with SP2 block the body onload ??

--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
........................with a computer
 
R

Ronx

With the XP SP2 Internet Explorer and firewall running with default
settings, yes it will, and so will most other pop-up blockers.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top