Hi,
I have the following javascript in the <head>:
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript"> var javascript_version = 1.0;</SCRIPT>
<SCRIPT LANGUAGE="JavaScript1.1" TYPE="text/javascript"> javascript_version = 1.1;</SCRIPT>
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
var newwin;
function launchwin(winurl,winname,winfeatures)
{
newwin = window.open(winurl,winname,winfeatures);
if(javascript_version > 1.0)
{
setTimeout('newwin.focus();',250);
}
}
//-->
</SCRIPT>
and this is the link I use in the body:
<a href="javascript:launchwin('./images/pics/filename.jpg','newwindow','left=22,top=22,scrollbars=yes')\">file</a>
since there's heaps of images that get loaded through PHP how can I set the newwindow to open to the image dimensions instead of having to specify them with height and width because all the image dimensions are different.
Thanks.
I have the following javascript in the <head>:
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript"> var javascript_version = 1.0;</SCRIPT>
<SCRIPT LANGUAGE="JavaScript1.1" TYPE="text/javascript"> javascript_version = 1.1;</SCRIPT>
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
var newwin;
function launchwin(winurl,winname,winfeatures)
{
newwin = window.open(winurl,winname,winfeatures);
if(javascript_version > 1.0)
{
setTimeout('newwin.focus();',250);
}
}
//-->
</SCRIPT>
and this is the link I use in the body:
<a href="javascript:launchwin('./images/pics/filename.jpg','newwindow','left=22,top=22,scrollbars=yes')\">file</a>
since there's heaps of images that get loaded through PHP how can I set the newwindow to open to the image dimensions instead of having to specify them with height and width because all the image dimensions are different.
Thanks.