Results 1 to 4 of 4

Thread: An IFrame Challenge!

  1. #1
    Join Date
    Jun 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default An IFrame Challenge!

    Hi Guys,

    Hopefully someone knows a solution to this IFrame obstacle I have on my web page.

    This is what I have posted:

    <div class="pad5tb"><iframe src='http://sanfrancisco.giants.mlb.com/NASApp/mlb/mlb/news/boxscore.jsp?gid=2005_06_24_sfnmlb_oakmlb_1&c_id=sf' width='757' height='148' frameborder='0' scrolling='no' border='0'></iframe></div>

    Where readers of my web page can see last night's box score of SF Giants. The problem is that the IFrame starts in the upper left corner of the source, where you see the MLB logos +++. My goal is to just show the box score, which means I need the iframe to scroll down some 110px. As it is now, you would have to scroll down manually.

    Does any of you wizzards know a way to automatically scroll down the iframe source a certain amount of px?

    Thanks a lot!
    -Bovels

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I'm not sure if this will work but, first of all, consider that you cannot change the scroll position of an external page that you have no access to. With that in mind, I'd try putting the external page in an iframe with width and height set to width="100%" height="2000" or some such thing and scrolling="no". Have this iframe be on a separate page with the body tag on that page looking something like this:
    Code:
    <body onload="window.scrollTo(0,x)">
    Where x is how far down you want it to scroll. Put this page in your original iframe.
    Last edited by jscheuer1; 06-25-2005 at 07:01 PM. Reason: add info
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Jun 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default It works!

    WOW, you are amazing!! it works!! thank you. the only change I had to make was to ad an ; between x) and ">

    have a great day my friend!

    -b

  4. #4
    Join Date
    Oct 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    This was great! But I have one more wish. The thing is that I'm a reseller for something. I want to show something from the wholesaler's homepage but I can absolutely not let anyone see where it comes from. With above method, there is a natural delay on the scrollto operation (while the page is loading) when the header and logo of the wholesaler's company is clearly seen during a couple of seconds before it scrolls to desired position. I cannot have it like this. Could I somehow slow down the iframe on my homepage while the first iframe is loading...? or make the viewing progressive...?

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
  •