Hi, I am currently trying to plan the Explorer layout for adding some GIF images. I am able to query the height and width of the explorer using JS, below commands:
HEIGHT:
$height = '<script type="text/javascript">
if (window.innerHeight) //if browser supports window.innerWidth
document.write(window.innerHeight)
else if (document.all) //else if browser supports document.all (IE 4+)
document.write(document.body.clientHeight)
</script>';
WIDHT:
$width = '<script type="text/javascript">
if (window.innerWidth) //if browser supports window.innerWidth
document.write(window.innerWidth)
else if (document.all) //else if browser supports document.all (IE 4+)
document.write(document.body.clientWidth)
</script>';
Now if I run echo "width<br>";
<-- It returns the correct width of the explorer.
But if I do an edit to this value in the PHP code, for example: $width = $width - 200;
echo "$width<br>";
<-- This returns - 200
Can any give some insight why I am unable to make the subtraction correctly here?