View Full Version : pageYoffset undefined in child
04-11-2003, 01:38 AM
i have opened a child window and am trying to display the
pageYOffset like this
child.document.write('the offset is '+child.pageYOffset);
i keep getting undefined
as the result...
any idea why???
04-11-2003, 04:44 AM
never heard of child.
04-11-2003, 07:05 AM
apologies if that wasnt too clear :(
oh well what i mean is child where child is any child window
in this case i open a window from the main page called search, so im saying that this is a child window
here are the attribs of search
var pop_search="width=400,height=480,resizable=yes,scrollbars=yes,titlebar=no,toolbar=no,directories=no,location=no, menubar=no,status=no";
var search = window.open('','search_window',pop_search);
so then i do
search.document.write('the offset is '+search.pageYOffset);
in other words im trying to display the pageYoffset in the child window named search and i keep getting undefined no matter how much stuff is on the page
i have also tried
04-11-2003, 07:50 AM
pageYOffset is NS-only, isn't it?
You need document.body.scrollTop for IE (unless you've got IE6 and an XHTML doctype, in which case you'd want document.documentElement.scrollTop)
04-14-2003, 12:19 AM
I hate it when that happens!:mad:
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.