Creating a popup window in a frame

I start with a client-side image map located in a frame.  When I click on a hot spot, I wish to open a popup window in the same frame, without closing the frame.  I have used:

<AREA SHAPE="circle" coords="717, 53, 10" ALT="Name" href="link1.html" onClick="winOpen(this)">

to call the following function:

function winOpen(theLink) {,'resizable=yes,width=190,height=135,status=no,location=no,toolbar=no,directories=no,menubar=no,scrollbars=yes');

Doesn't work.  What do I do?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Michel PlungjanIT ExpertCommented:
<AREA SHAPE="circle" coords="717, 53, 10" ALT="Name" href="javascript:winOpen('link1.html')">

function winOpen(theUrl) {


Netscape in particular does not like the onClick in area tags

adamssrAuthor Commented:
Looks good, but when I tried it, I got an error message (invalid argument).
Michel PlungjanIT ExpertCommented:
That is because your is invalid - needs a window name, sorry I didn't spot that.,'windowname','width=190,height=135,resizable,scrollbars')


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Give him his points back. He forgot to wedge a name for the window between the URL and the attributes:,someName,'resizable=....');
Michel PlungjanIT ExpertCommented:
Thanks mblase

Spotted it too  ;-)
adamssrAuthor Commented:
Thanks, Michel.  Works fine.  Now, if I click on another hot spot on the image map, how can I make the new popup window replace the first?  I'll repost this second question with another 50 points for you if you can answer it.
That's easy -- call winOpen() with a new URL. As long as it uses the same window name and parameters, it'll keep using the same popup window.

You may, however, want to add 'windowname.focus()' to your winOpen() function, to bring that window back to the front.
Michel PlungjanIT ExpertCommented:
or better, use
<BODY onLoad="if(window.focus) self.focus()">

in the new windows.


PS: Thanks for your enthusiasm, mblase...
Hey, I like a race as much as anyone. :) (I'm not trying to steal anyone's points -- by all means, adamssr, give 'em to Michel.)

Now, Michel, you've been on here long enough this morning -- shouldn't you get back to work and let the rest of us earn some points? ;-)
adamssrAuthor Commented:
Thanks again, Michel.  Works great.  Will post the new question as "For Michel".  Reply something and I'll give you the points.

Thanks also, mblase, but I like Michel's answer.
Michel PlungjanIT ExpertCommented:
Hehe - save your points Adam...

I will go home, give mblase a few hours to stalk the questions ;-)

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.