SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Evangelist NokX's Avatar
    Join Date
    Feb 2003
    Location
    Knoxville, TN
    Posts
    523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Post Conflicting Scripts

    i'm having an issue with the scrollTo function...

    Code:
    window.opener.location.reload();
    window.opener.scrollTo(0,200);
    when i use the above code, it'll refresh the parent window, but it won't scroll to the set amount. however, when i use the following code it works, but obviously won't refresh since i took that part out...

    Code:
    window.opener.scrollTo(0,200);
    is there a way i can get both to play well together?

  2. #2
    Shiver me timbers!! anthony_irl's Avatar
    Join Date
    Aug 1999
    Location
    Dublin, Ireland
    Posts
    495
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm. I'm not 100% sure on this but it could be because the scrollto command is run straight away after the reload and the browser cannot scroll down while it is waiting on the reload to finish. Could you use this after the reload command: setTimeout(10000). I believe that'll wait 10 seconds before continuing on to the next command which should scroll down.
    Anthony - How's tings?

    24 hours in a day, 24 beers in a case. Coincidence? I think not.
    Contact me by: PM Email NEW! Carrier Pigeon


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
  •