Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jan 2005
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    A rather frustrating Safari problem

    Safari has some kind of default setting that, once a page is loaded, it automatically positions the upper left corner of the document to the upper left corner of the browser. I'm trying to use onLoad and scrollTo to make it so the page loads at a different position on the document (using anchor points isn't sufficient for my purposes). What ends up happening is that the scrollTo method positions the document correctly for a quick second, but the browser quickly repositions itself. Is there a way to work around this?

  • #2
    New to the CF scene
    Join Date
    Jan 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Maybe use setTimeout in the onload to execute your reposition function after safari has repositioned the page for the first time?

  • #3
    New Coder
    Join Date
    Jan 2005
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Unfortunately, the page I'm making loads a rather large image into the background of a table. On slower connections this image may take as long as ten seconds to load. Using onLoad in the <body> tag, the javascript code starts firing off as soon as it can. Safari doesn't reposition the browser until all elements on the page have loaded (I can't think of a reason why they programmed it this way; no other browsers on the market do this).

    So, to accomodate slower users, I would be setting the timeout for as long as ten seconds, which would be ridiculous for highspeed users. Even still, I have no way of guaranteeing that it will work properly.

    One possibility I've considered is setting it to wait for the image to load, but with the image being the background to a table, I'm not sure how to do this.

    Here's the page I'm working on:

    http://www.appfilmfest.org/draft1


  •  

    Posting Permissions

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