Javascript / Popups / No Borders
loads a picture in a popup with no borders in the popup.
General Details
Snippet uploaded by: snippet
Email : webmaster@snippetlibrary.com
Snippet By: Unknown
<!---Head--->
<script>
function LoadPhoto(the_href) {
var w = window.open('', 'Photo', 'width=630,height=420,left=0,top=0');
w.document.writeln("<HTML><HEAD>");
w.document.writeln("<TITLE>" + the_href + "</TITLE>");
w.document.writeln("<STYLE> BODY { margin-left: 0; margin-top: 0 } </STYLE>");
w.document.writeln("</HEAD><BODY><A HREF='javascript:self.close();'><IMG");
w.document.writeln("SRC='" + the_href + "'");
w.document.writeln("onMouseOver='window.status='click image To Close this window'; Return True;'");
w.document.writeln("onMouseOut='window.status='';'");
w.document.writeln("BORDER=0 WIDTH=630 HEIGHT=420 VSPACE=0 HSPACE=0");
w.document.writeln("ALT='click image to close this window'");
w.document.writeln("></A>");
w.document.writeln("</BODY></HTML>n");
w.document.close();
w.focus();
}
</script>
<!---Body--->
//call it like this
<A HREF="javascript:LoadPhoto('images/location.gif')">Click here
</a>
Subject: Does not work
Comment By: Cap on Mon 24th of January 2011 03:52:08 AM
Does not work. Under Windows Internet Explorer 8, the script section is flagged with a message indicating a parenthesis is missing on the following line of code:
w.document.writeln("onMouseOver="window.status='click image To Close this window'; Return True;"");
w.document.writeln("onMouseOver="window.status='click image To Close this window'; Return True;"");
Subject: Re: Does not work
Comment By: Snippet on Sat 05th of February 2011 05:36:53 PM
I found the problem and it should now work fine.
