imported_silkroad
09-22-2009, 02:47 AM
Anyone know why this simple javascript does not work?
<script type="text/javascript">
<!--
if (screen.width > 500) {
document.write('<td><img src="$vbphrase[image_bucket]/images/space.jpg"></td>');
document.write('<td><img height="280px" src="$vbphrase[image_bucket_/images/logo.jpg"></td>');
}
//-->
</script>
The purpose is to simply check the screen.width using js and if greater than 500 write some additional HTML.
Thanks.
--------------- Added 1253591522 at 1253591522 ---------------
Nevermind... it's working... :D
<script type="text/javascript">
<!--
if (screen.width > 500) {
document.write('<td><img src="$vbphrase[image_bucket]/images/space.jpg"></td>');
document.write('<td><img height="280px" src="$vbphrase[image_bucket_/images/logo.jpg"></td>');
}
//-->
</script>
The purpose is to simply check the screen.width using js and if greater than 500 write some additional HTML.
Thanks.
--------------- Added 1253591522 at 1253591522 ---------------
Nevermind... it's working... :D