SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Zealot
    Join Date
    Mar 2004
    Location
    united states
    Posts
    178
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    how to detect whether an IFrame will need a scrollbar?

    Hello

    I have an iframe with scrolling="no".
    Is there of knowing whether that IFrame will need a frame once it is loaded with content?
    Someway of comparing its height with the height of its content... (possibly...)

    thanks

  2. #2
    SitePoint Wizard
    Join Date
    Jul 2003
    Location
    Kent
    Posts
    1,921
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    You could remove the scrolling="no" That would work. I don't see this as a problem.

  3. #3
    SitePoint Zealot
    Join Date
    Mar 2004
    Location
    united states
    Posts
    178
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No, the scrolling="no" is there on purpose.
    I am implementing a fancy scrolling myself.
    However I would like to know whether I should show my fancy mechanism.
    I will show it only when scrolling is needed for the IFrame.
    This is why I need to know this.

  4. #4
    SitePoint Addict
    Join Date
    Nov 2003
    Location
    Malmoe, Sweden
    Posts
    265
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What UA do want to implement this on?

    IE? Here you can calculate the width and height by using clientWidth/offsetWidth or something like that.

    Mozilla? There is a neet little thingy called getComputedStyle or something like that.

    Check the different vendors documentation on the matter.

  5. #5
    SitePoint Evangelist IJoeR's Avatar
    Join Date
    Feb 2003
    Location
    Somewhere in, MD
    Posts
    400
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    doesn't scrolling="auto" do the trick?


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
  •