I'm trying to use Java so I can report the size of the screen to the PHP page, but I am having a bit of trouble with this..
At the top of my php page I have this.
<script language="JavaScript">
function OpenImage(path, img)
{
if (navigator.appName == 'Netscape' && document.layers != null) {
wid = window.innerWidth;
hit = window.innerHeight;
}
if (document.all != null){
wid = document.body.clientWidth;
hit = document.body.clientHeight;
}
parent.location='index.php?path='+path+'&wd='+wid+'&img='+img+'&ht='+hit;
}
</script>
a simple script to report the client width of the page to the php page along with info passed from the php generated html on an image click.
in PHP i have this code.
echo "<A HREF=\"$thisfn?path=$newwd&img=$fnu\"i onClick=\"OpenImage($newwd,$fnu)\">";
and when viewing the webpage i see this in the html.
<A HREF="index.php?path=Life%20in%20Kentucky%2Fthe%20Duckies&img=DCP_0987.JPG"i onClick="OpenImage(Life%20in%20Kentucky%2Fthe%20Duckies,DCP_0987.JPG)">
When I open the page.. IE reports errors on the page, and on click, nothing gets passed to the address bar, so i assume it dosent use the java script..
ANy ideas?
Thanks