Forum Moderators: open
<SCRIPT TYPE="text/javascript">
<!--
function popup(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
href=mylink;
else
href=mylink.href;
window.open(href, windowname, 'width=400,height=200,scrollbars=yes');
return false;
}
//-->
</SCRIPT> <a href="http://www.chicksaddlery.com/Merchant2/graphics/00000001/5735TC-TCN.JPG" onClick="return popup(this, 'Chicks')">
<img SRC="http://www.chicksaddlery.com/Merchant2/graphics/00000001/tn5735TC-TCN.JPG" border=0></a> Am I to have a different 'windowname' specified for each link in the HTML of the product page?
We would prefer not to allow the user to 'clutter' themselves with multiple popups.
When I changed over to your script and applied the proper code to the individual links I received no popup;
The first mistake any developer can make is to force your visitors to use your site in the way you think it should be used.
You *can* force focus on the pop up
<script type="text/javascript">
var myWindow;
function popup(mylink, Chicks)
{
var href;
if (typeof(mylink) == 'string')
href=mylink;
else
href=mylink.href;
myWindow = window.open(href, Chicks, 'width=400,height=200,scrollbars');
if (!myWindow.closed) {
myWindow.focus( );
}
return false;
}
</script>