»
EnglishFrenchVietnamese

Print - Picture in New Window onClick - JavaScriptBank.com

Full version: jsB@nk » Image » Picture in New Window onClick
URL: https://www.javascriptbank.com/picture-in-new-window-onclick.html

Picture in New Window onClick © JavaScriptBank.comAnother script to display picture in a new window when visitors click on images.

Full version: jsB@nk » Image » Picture in New Window onClick
URL: https://www.javascriptbank.com/picture-in-new-window-onclick.html



JavaScript
<SCRIPT language=JavaScript>  <!--function newWin(foto)  {  nImage = new Image();  nImage.src = foto;  width = screen.width;  height = screen.height;  i = nImage.width;  j = nImage.height;  k = 'no';    if (i > screen.width)      {        i = screen.width - 80;        j = nImage.height + 30;        k = 'yes';       }     if (j > screen.height)       {         j = screen.height - 100;         i = nImage.width + 40;         k = 'yes';       }     if (width == 0 || height == 0)       {         i = 640;         j = 480;         k = 'yes';       }     else       {         i = i + 40         j = j + 30       }  myWin= open("", "_blank",   "width="+i+",height="+j+",status=no,toolbar=no,menubar=no,scrollbars="+k+",resizable="+k+"");  myWin.document.open();  myWin.document.write("<html><head><title>Ôîòî</title></head><body bgcolor='#C0C0C0' leftmargin='7'><p align='center' style='margin-left: 10; margin-top: 10'><img border='0' src='");  myWin.document.write(foto);  myWin.document.write("'></p></body></html>");  myWin.document.close();}//--></SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<A onclick="newWin('gif_logojsb2.gif')" href="#"><IMG src="gif_logojsb2.gif" border=0></A><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->