Members

Technology Zones

Articles

Hosted By

MaximumASP

Info

Hiding the scroll bar when mouse is over a textbox

Last post 04-23-2008 2:45 PM by thedrunkendevilx. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 04-22-2008 3:53 PM

    Hiding the scroll bar when mouse is over a textbox

    when the mouse is over either txtTimeFrom or txtTimeTo i want the scroll bar to be hidden and and the right margin of the page to be 17px

    Here is my javascript code it seems to work fine in firefox but does not work in IE:

    window.onload = function()

    {  txtTimeTo.onmouseover = function(){DisableScroll();}

    txtTimeFrom.onmouseover = function(){DisableScroll();}

     txtTimeTo.onmouseout = function(){EnableScroll();}

    txtTimeFrom.onmouseout = function(){EnableScroll();}

    }

     

     

    function DisableScroll()

    {

    document.body.style.marginRight = '17px';

    document.body.style.overflow = 'hidden';

    }

     

     

     

    function EnableScroll()

    {

    document.body.style.marginRight = '0px'

    document.body.style.overflow = 'visible';

    }

     

    Any suggestions

     

    thanks in advance

    • Post Points: 5
  • 04-23-2008 2:45 PM In reply to

    Re: Hiding the scroll bar when mouse is over a textbox

    please help me

    • Post Points: 5
Page 1 of 1 (2 items)