Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-29-2007, 05:33 PM   PM User | #1
probey20
New Coder

 
Join Date: Aug 2006
Location: Illinois
Posts: 68
Thanks: 0
Thanked 0 Times in 0 Posts
probey20 is an unknown quantity at this point
Internet Explorer Jump to Parent Anchor From Within iFrame Using Target

Does anyone know how to put code on an included iframe which will cause the page to jump to a specific anchor point on the parent page? When I try the following, it only jumps to the top of the iframe and not to the top of the parent. I basically want it to scroll all the way to the top of the parent page as soon as the page loads.

Code:
window.location = "#top";
Thanks!
__________________
Sarah
probey20 is offline   Reply With Quote
Old 10-29-2007, 05:48 PM   PM User | #2
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,697
Thanks: 5
Thanked 875 Times in 850 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
How about:
Code:
window.parent.location ="#top"
?

http://developer.mozilla.org/en/docs/DOM:window.parent
__________________
Don’t click this link!
VIPStephan is offline   Reply With Quote
Old 10-29-2007, 06:43 PM   PM User | #3
probey20
New Coder

 
Join Date: Aug 2006
Location: Illinois
Posts: 68
Thanks: 0
Thanked 0 Times in 0 Posts
probey20 is an unknown quantity at this point
That actually caused the iframe to break out of the parent, so that none of the parent is visible.
__________________
Sarah
probey20 is offline   Reply With Quote
Old 10-29-2007, 11:29 PM   PM User | #4
Mr J
Senior Coder

 
Join Date: Aug 2002
Location: UK
Posts: 2,789
Thanks: 2
Thanked 14 Times in 14 Posts
Mr J is on a distinguished road
Give this a try

parent.scrollTo(0,0)
__________________
The silent one.

The most dangerous thing in the world is an idea.
The most dangerous person in the world is the one with an idea.
Mr J is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:44 AM.


Advertisement
Log in to turn off these ads.