I'm using the tinybox javascript code which basically opens up an image on the screen when a link is clicked. The thing is, I can set the height and width of the picture in the javascript code, but I want it fit 80% of the user screen resolution so that it doesn't become too larger on smaller screens.
Here is the code I'm working with: <script type="text/javascript"> var content2 = "<img src='gallery/pic/b1.jpg' width='900px' height='640px' alt='' />"; T$('b1').onclick = function(){TINY.box.show(content2,0,0,0,1)} </script>
The thing is, I can set the height and width of the picture in the javascript code, but I want it fit 80% of the user screen resolution so that it doesn't become too larger on smaller screens.
Here is the code I'm working with:
<script type="text/javascript">
var content2 = "<img src='gallery/pic/b1.jpg' width='900px' height='640px' alt='' />";
T$('b1').onclick = function(){TINY.box.show(content2,0,0,0,1)}
</script>
Any one can help me, please?
put these variables in for the height and width :D
Can you put the two bits of code together, maybe I did it in the wrong way or something... :P
Thanks karlpcrowley.
:) :)