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 2 of 2
  1. #1
    dep
    dep is offline
    Regular Coder
    Join Date
    Nov 2005
    Posts
    121
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Opening a new window and setting scroll position?

    How can i invoke a new browser window (pointing it to a page) and set the scroll position within the page?

    win = window.open('main.html', null, 'toolbar=0,scrollbars=0,location=0,menubar=0,resizable=0,width=308,height=443,left = 0,top = 0')
    win.scrollTo(400, 0)

    I thought would work, but does not.

  • #2
    dep
    dep is offline
    Regular Coder
    Join Date
    Nov 2005
    Posts
    121
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by dep
    How can i invoke a new browser window (pointing it to a page) and set the scroll position within the page?

    win = window.open('main.html', null, 'toolbar=0,scrollbars=0,location=0,menubar=0,resizable=0,width=308,height=443,left = 0,top = 0')
    win.scrollTo(400, 0)

    I thought would work, but does not.
    It works. I had to put a setTimeout before the scrollTo to give the window a chance to load.
    dep


  •  

    Posting Permissions

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