...

View Full Version : A Little Assistance Required Please



Dingbat
03-16-2005, 03:21 PM
Hi Guys,

Please see script below.

<script language="JavaScript"><!--
function openWin(img) {
winId = window.open('','newwin','width=400,height=450');
winId.document.write('<body onLoad="if (window.focus) window.focus()"><center>');
winId.document.write('<img src="' + img + '">');
winId.document.write('</center></body>');
winId.document.close();
}
//--></script>

<a href="javascript:;" onMouseover="openWin('images/headcovers.gif'); return false">image1</a>
<a href="javascript:;" onMouseover="openWin('images/colour.gif'); return false">image2</a>
<a href="javascript:;" onClick="openWin('images/WILTS.gif'); return false">image3</a>

This works great. My need is to include in the script a button to close the popup. :o

DanHibiki
03-16-2005, 03:44 PM
winId = window.open('','newwin','width=400,height=450');
winId.document.write('<body onLoad="if (window.focus) window.focus()"><center>');
winId.document.write('<img src="' + img + '">');
winId.document.write('<a href="javascript:(window.close());">close</a>');
winId.document.write('</center></body>');
winId.document.close();

Dingbat
03-16-2005, 04:23 PM
Well blow me down. Thanks Dan I should have seen that. :thumbsup:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum