Helpful Information
 
 
Category: Web Design and HTML
Open a new window

I am trying to create a link that will open a pop-up window using javascript. You can view the link at http://www.storesnsuch.com/joinus.htm. As you can see for yourself, the link doesn't work.

The code I'm using is
<a href="javascript:void(0)" onclick="window.open('contactmini.htm','Contact Us','width=500, height=350, menubar=no, status=no')">contact us</a>

The browser (IE6) seems to not like the void() function. I tried defining a
function myvoid() {}but it makes no difference. When I run this on my machine (localhost) it works fine, but doesn't seem to work anywhere else.

Any ideas?

Thanks,
Steve

You might try using href="javascript:;" instead of the void(). That has always worked for me.

I think the problem might be with the name of the window being "contact us" - the space is not allowed. Try changing it to "contact_us"...

FZ,

That did the trick. Thanks to both of you for your help. So far, I've gotten all the help I need on this forum. Thanks to everyone that Contributes!!

Steve

Glad it worked, Steve.










privacy (GDPR)