willsherwood
asked on
HTML frames: how to scroll to top of parent
what JS code can i put in a child frame HTML such that upon entering that child page,
the parent scrolls to the top?
the child frame is very tall, and has a SUBMIT for a search.
(AJAX is not desirable for this situation)
perhaps some variation of:
document.body.scrollTop = document.documentElement.s crollTop = 0;
but reference the parent,
and do it by default upon entering the child page.
thanks!
the parent scrolls to the top?
the child frame is very tall, and has a SUBMIT for a search.
(AJAX is not desirable for this situation)
perhaps some variation of:
document.body.scrollTop = document.documentElement.s
but reference the parent,
and do it by default upon entering the child page.
thanks!
Can you please post a link to your example page? If you don't have one, then just create a simple example and upload so we can see what you are talking about.
ASKER
the top level (parent) iframe =
<p><iframe style="background: transparent;" src="http://xxx.org/members/member-directory.php?k=1685" height="3085" width="700" seamless="seamless"></ifra me></p>
(it's a protected directory, sorry)
in the file member-directory.php
i'd like a JS statement that scrolls the parent window to its top
<p><iframe style="background: transparent;" src="http://xxx.org/members/member-directory.php?k=1685" height="3085" width="700" seamless="seamless"></ifra
(it's a protected directory, sorry)
in the file member-directory.php
i'd like a JS statement that scrolls the parent window to its top
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks
window.parent.$("body").an imate({scr ollTop:0}, 'slow');
did the trick
window.parent.$("body").an
did the trick