I want to dynamically set the height and width of an image using javascript so that the image looks proportionally fine according to different screen resolutions..
The original image is of 252*62 pixels..
I have used the following code..but it doesnt seem to work.
Code:<script type="text/javascript"> function resizeheight() { var height = ((62*screen.height)/800); return height; } function resizewidth() { var width = ((252*screen.width)/1280); return width; }HTML Code:<img id="enter" src="enter.PNG" height="resizeheight()" width="resizewidth()" >