anchors and iframes? -


i have html document iframe in it. now, if click button/link in iframe, want parent document scroll top.

i'm not sure how make work. when put anchor @ top of parent document, , have button window.parent.location = '#anchorname';, browser opens iframe document itself, having parent 1 vanish.

first of all, suggest usage of jquery scrolltop (see here) scroll on top. not enough, however, need call function page in iframe, so, supposing function scrolls document called 'foo', can call function page in iframe way:

window.parent.foo(); 

hope helps.


Comments

Popular posts from this blog

How do you change vbulletin's home page to the forums instead of the default (CMS or Activity Stream)? -

c++ - Troubles when compiling phash program -