SitePoint Sponsor

User Tag List

Results 1 to 11 of 11

Hybrid View

  1. #1
    SitePoint Evangelist jazztie's Avatar
    Join Date
    Mar 2001
    Location
    the Netherlands
    Posts
    519
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Graphic Scrollbar

    I have a frameset with a menu. The menu is filled from a database and has several levels.

    So, if the menu 'unfolds' it is sometimes longer than the page... which makes the scrollbar appear.

    Now: I DON'T WANT THAT.
    What I want, is a script which checks if the page is getting longer than the frame. If so, I want it to display two buttons to scroll up and down in the page.

    Can anyone please help me? I can't find it on the internet. I have tried some, but somehow the scripts won't work. (Maybe because I use a lot of PHP and database scripting???)

    Jazz

  2. #2
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    why dont you use a inline frame? much simpler.
    eg here
    http://www.australianinfront.com.au/start.html

  3. #3
    That's Right. notepad_coder's Avatar
    Join Date
    Apr 2002
    Location
    Colorado
    Posts
    835
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    use an iframe and then put the scrollers next to it like i do on http://www.nathantech.com/~nathan it turns the iframe into a layer kind of, i really dont uderstand it though
    - the lid is off the maple syrup again!

  4. #4
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  5. #5
    SitePoint Enthusiast
    Join Date
    Jul 2000
    Location
    Australia
    Posts
    67
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Instead of createing a new thred I will just ask my question as part of this thread.

    How would one go about using JavaScript to do the work of a scrollbar when an image is clicked.

    Later,
    WebmasterMattD
    WebmasterMattD.NET

  6. #6
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    look at the links i posted theres an example in there

  7. #7
    SitePoint Enthusiast
    Join Date
    Jul 2000
    Location
    Australia
    Posts
    67
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Okay, those links are helpfull, though what I want to do is have two (2) images that act as the up and down button of the scroll bar without the actual bar bit inbetween.
    WebmasterMattD
    WebmasterMattD.NET

  8. #8
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hyperlink http://www.dansteinman.com/dynduo/ex...concepts3.html

    img http://www.dansteinman.com/dynapi/do...niscroll2.html

    that help.

    sry just being lazy at the moment. if you cant get it to work i will d it for u

  9. #9
    SitePoint Enthusiast
    Join Date
    Jul 2000
    Location
    Australia
    Posts
    67
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The link that you are showing doesn't seem to work in Mozilla (1.0rc1).

    what I have been trying to do is manipulate window.pageYOffset

    I am not sure if this can be manipulated.

    Thanks for your help so far.
    WebmasterMattD
    WebmasterMattD.NET

  10. #10
    SitePoint Enthusiast
    Join Date
    Jul 2000
    Location
    Australia
    Posts
    67
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Okay I have figured out how to do what I wanted.

    the javascript code to scroll a window is scrollBy(x, y)

    to scroll a particular frame the code is
    parent.framename.scrolBy(x, y);
    x and y are both pixle values that scroll the window by the specified amount of pixles.

    Later,
    WebmasterMattD
    WebmasterMattD.NET

  11. #11
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    window.scrollTo(iXiY//or
    window.scroll(iXiY)   //or
    object.scrollIntoView(true//or 
    you have these methods as well just to let you know


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
  •