View Full Version : Pop-Up Window Generator / On Image
tomyknoker
09-04-2006, 05:28 AM
I am using this link http://www.dynamicdrive.com/dynamicindex8/popwin.htm for the pop up window, i wanted to get it to work by clicking on an image... any ideas?
jscheuer1
09-04-2006, 05:32 AM
<a href="http://www.google.com" onclick="NewWindow(this.href,'mywin','300','200','no','center');return false" onfocus="this.blur()"><img src="some.gif" border="0"></a>
terkini
09-04-2006, 05:58 AM
<a href="http://www.google.com" onclick="NewWindow(this.href,'mywin','300','200','no','center');return false" onfocus="this.blur()"><img src="some.gif" border="0"></a>
I want the reader to have the ability to close the pop-up window once they finished reading it by click on a the words "Close Window" at the bottom section of the page. How do i do that?
jscheuer1
09-04-2006, 06:31 AM
I want the reader to have the ability to close the pop-up window once they finished reading it by click on a the words "Close Window" at the bottom section of the page. How do i do that?
Well, if it is your own page, put this at the bottom:
<a href="#" onclick="self.close();return false;">Close Window</a>
If it is someone else's page, you are out of luck unless you can get them to put that code on their page.
jscheuer1
09-04-2006, 06:43 AM
Better yet, put this script at the bottom of the page:
<script type="text/javascript">
if(this.opener)
document.write('<a href="#" onclick="self.close();return false;">Close Window</a>')
</script>
That way, if the page is reached via another method other than javascript, the link to close it won't be displayed as, it wouldn't work anyway.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.