...

View Full Version : Opening a new window and setting scroll position?



dep
12-20-2005, 09:10 PM
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.

dep
12-20-2005, 09:40 PM
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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum