Results 1 to 4 of 4

Thread: iFrame help

  1. #1
    Join Date
    Apr 2006
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default iFrame help

    Hi,
    Is it possible to make an iFrame like... start at a certain part of the page and alow no scrolling. Making it so it shows a part of the page, for example this WYSIWYG editor would be the only thing you would beable to see in the iFrame. Is that possible? If so, how?

  2. #2
    Join Date
    Apr 2006
    Posts
    190
    Thanks
    3
    Thanked 7 Times in 7 Posts

    Default

    This is pretty easy to setup. All you need to do is place.

    Code:
    <a name="edit"></a>
    Just above your WYSIWYG editor

    And youc an use the following to setup up the iFrame

    Code:
    <iframe src="test.html#edit" width="800px" height="600px" scrolling="No" frameborder="0"></iframe>
    The text in blue tells it were to point to in the HTML document. So when the iFrame loads telling it to goto #edit the page well jump to that A tag named edit thus showing you your editor.

    The text in red shows you how to disable scrolling.

  3. #3
    Join Date
    Apr 2006
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hmm.. That's not quite what I meant. And the WYSIWYG was just an example. The page I need to load in the iFrame isn't mine, so I can't edit it to have the <a name>'s. :/

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    In that case, if there isn't one there already, then no. There are methods to scroll to a certain pixel distance, but it would be very unreliable, and since you don't want to allow scrolling, it wouldn't work. Oh, and the mouse wheel or arrow keys can still be used to scroll a non-scrolling iframe in most browsers.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

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
  •