can't disable scrollbars for certain websites

Discussion in 'Javascript' started by Raja Kannan, Aug 4, 2004.

  1. Raja Kannan

    Raja Kannan Guest

    I have this following code,
    in the below program if u click on hide it will hide he scrollbars of
    the 2 frames by setting the overflow attribute to hidden. the problem
    is frame1 seems to hide the scrollbars but the frame2
    (search.yahoo.com) seems to be not hiding the scroll bar. there is
    something special about the search.yahoo.com com webpage which
    prevents from hiding the scrollbar.

    so any help would be appreciated if there is anyway we can disable he
    scrollbars when pages are loaded with similar pages.

    note if run this html in a browser it will give access denied
    exception but rename ur htm to .HTA extesnion and run where it will
    work.

    <HTML>
    <HEAD>
    <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
    <TITLE></TITLE>
    <script language="javascript">
    function hide() {
    window.frames[0].document.body.style.overflow='hidden';
    window.frames[1].document.body.style.overflow='hidden';
    }
    function unhide() {
    window.frames[0].document.body.style.overflow='';
    window.frames[1].document.body.style.overflow='';
    }
    </script>
    </HEAD>
    <BODY>
    <iframe name="frame1" src="http://www.google.com" widht=100 height
    =200></iframe><BR>
    <iframe name="frame2" src="http://search.yahoo.com" widht=100 height
    =100></iframe>
    <BR>
    <input type="button" onclick="hide();" value="hide" id=button1
    name=button1>
    <input type="button" onclick="unhide();" value="unhide" id=button2
    name=button2>
    <P>&nbsp;</P>

    </BODY>
    </HTML>
     
    Raja Kannan, Aug 4, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    676
  2. avrootshell
    Replies:
    0
    Views:
    360
    avrootshell
    Mar 13, 2007
  3. Replies:
    2
    Views:
    552
    bruce barker
    Mar 25, 2008
  4. Google Jenny

    How do I disable scrollbars on a multiline textbox?

    Google Jenny, Oct 1, 2004, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    941
    Google Jenny
    Oct 6, 2004
  5. SAN CAZIANO
    Replies:
    8
    Views:
    197
    Dr John Stockton
    Oct 15, 2004
Loading...

Share This Page