Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jul 2002
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Changing property of body tag

    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.

  • #2
    Regular Coder Vincent Puglia's Avatar
    Join Date
    Jul 2003
    Location
    where the World once stood
    Posts
    367
    Thanks
    0
    Thanked 13 Times in 13 Posts
    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
    Where the world once stood
    the blades of grass
    cut me still

  • #3
    New Coder
    Join Date
    Jul 2002
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thank you very much Vinny. Looks good . I'll try it.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •