...

View Full Version : Changing property of body tag



chelentano
09-30-2003, 08:28 PM
Is there way to change parameter of body tag from
scroll="no"
to
scroll="yes"
depending on screen resolution?
For instatnce, if screen res. 1024x768 and above use scroll="no" ,
otherwise use scroll="yes"

Sample body tag I would be using:
<body onLoad="init();EH_preloadImage('../definit.gif','../feedback.gif','../graphics/at_image.gif','../menu_over.gif','../../graphics/back_over.gif')" bgcolor="#003084" scroll="no">

Thia is for IE5+ only.
Thank you very much for any ideas.

Vincent Puglia
09-30-2003, 09:08 PM
win1 = window.open("", "", "scrollbar=no; width=100; height=100;")
win1.document.write("<html><body><p>1</p><p>2</p><p>3</p><p>4</p><p>5</p><p>6</p></body></html>")

function doit()
{
if (screen.width == 800)
win1.document.body.scroll='yes'
}
//-->
</script>
</head>
<body>
<input type="button" onclick="doit()">

</body>

Vinny

chelentano
10-01-2003, 06:22 AM
Thank you very much Vinny. Looks good . I'll try it.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum