SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Guru JoePrice's Avatar
    Join Date
    Jan 2002
    Location
    UK
    Posts
    673
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to add a scrollbar to an existing window?

    Hi Chaps

    I've got a window that has no scrollbars in it,
    however when clicking on a link within that window I want that new page to have a scroll bar.

    How can this be done?

    I've tried putting this code below at the top of the page:
    Code:
    <script language="javascript">
    window.scrollbars.visible = true;
    </script>
    However, this generates an error. Reason being I think is because the scrollbars just arent there so that cant be visible or invisible.

    So my question being is how can I add a scrollbar to an existing window which doesnt have one?

    Many thanks

  2. #2
    SitePoint Wizard silver trophybronze trophy asp_funda's Avatar
    Join Date
    Jun 2003
    Location
    ether
    Posts
    4,497
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    this should work.

    Code:
    <script language="javascript">
    window.scrollbars = true;
    </script>
    Our lives teach us who we are.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Me - Photo Blog - Personal Blog - Dev Blog
    iG:Syntax Hiliter -- Colourize your code in WordPress!!

  3. #3
    SitePoint Wizard silver trophy
    Join Date
    May 2003
    Posts
    1,843
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you opened that window without setting the 'scrollbars' switch (in the features argument) you can't turn them on, period. Pop-up windows stay configured pretty much the way they were opened.

    window.scrollbars is a Gecko object only, and requires a signed script to program.
    ::: certified wild guess :::

  4. #4
    SitePoint Wizard silver trophybronze trophy asp_funda's Avatar
    Join Date
    Jun 2003
    Location
    ether
    Posts
    4,497
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Yeah, I see what you mean, but even after declaring scrollbars=0, this thing is not working, I mean scrollbars don't appear.

    But I read somewhere that if an object is not specified in the features argument, like scrollbars, it is taken to be false by default. And the switch is created since how else can you set an object to false?

    So why can't scrollbars be set to true later?

    There's gotta be a way to do that, no?
    Our lives teach us who we are.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Me - Photo Blog - Personal Blog - Dev Blog
    iG:Syntax Hiliter -- Colourize your code in WordPress!!


Bookmarks

Posting Permissions

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