View Full Version : scrollTo in a pop up window
gimpdog
11-10-2002, 10:15 PM
im having troubles trying to get a new window to pop up to a certain address and scroll that window to a certain location.
i can open the window using window.open and can adjust the size but whenever i issue the scroll or scrollby or scrollto function i get an access denied error. the window that is opening is uncontrollable content so all i have to work with is the opener window.
ive looked around and found an example on javakit but i got the same error. is this disabled due to a security patch? im using IE6.
THNX
chrismiceli
11-10-2002, 10:34 PM
did you try doing this
window.open("www.yahoo.com#hello""name""etc")
and do you have the <a name="hello"> on your page?
joh6nn
11-10-2002, 11:27 PM
you noted that the content in the new window, isn't something you have control over. is this because it's content on another site? if so, then you may be up the creek.
javascript doesn't allow you to do very much with pages that come from other sites, because it could potentially lead to security problems.
gimpdog
11-10-2002, 11:44 PM
i cant use an anchor tag because as i have stated the pop up window is uneditable...but thnx for the response chris
and joh6nn the window is from our site but a different box...its a runtime generated DB html document. the problem is there is a home and help link in the DB page that go back to the DB home and help so for less confusion id like to set the width and height and then scroll so that the home and help links aren't seen. damn macintosh web server!!!:)
joh6nn
11-10-2002, 11:53 PM
try setting document.domain, in the main page, to be whatever the domain name in the pop up would be. so if your main page is www.something.com, and the popup is else.something.com, then in the miain page you say:
doucment.domain = 'else.something.com';
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.