OK, I have an iframe and wish the height of it to be, say 650px if the resolution of the users’ screen is higher than 800×600. Can anyone help me? cheers
<html> <head> <script language="javascript" type="text/javascript"> function setvals() { if (screen.height > 600) { document.getElementById("myiframe").style.height = "600px"; } else { document.getElementById("myiframe").style.height = "300px"; } } </script> </head> <body onload="setvals()"> <iframe id="myiframe" style="height:300px;"></iframe> </body> </html>
Help @rellik spread the word by sharing this article on Twitter...