...

View Full Version : quick help needed with basic pop up windo



mat
08-22-2002, 07:19 AM
a html page that has an image "button.gif" which is the link > when clicked a new window with say a width of 200 and height of 400 pops up (no bar, menu scroll etc) this new pop up is "more_info.html"

how can i do this? simply :)

joh6nn
08-22-2002, 07:27 AM
<A HREF="thepage.htm" target="popup" onClick="window.open('thepage.htm','popup','width=200,height=400'); return false">click click</a>

mat
08-22-2002, 09:41 AM
thanks, :thumbsup:

what is the "return false" for? what does this do?

joh6nn
08-22-2002, 09:45 AM
<A HREF="thepage.htm" target="popup" onClick="window.open('thepage.htm','popup','width=200,height=400'); return false">click click</a>

the bit in bold, will cause a new window to open. this is there for people with browsers that can't handle javascript ( or have javascript turned off ). for people who do have javascript capable browsers, there's the onclick bit. but now, the javascript and non javascript parts will fight with each other. the "return false" part, will turn off the non javascript part ( cancels the normal action of a link ), leaving only the javascript working. so, even if people don't have browsers that can handle javascript, they can still get to the next page.

mat
08-22-2002, 10:05 AM
nice.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum