html - Javascript - Move DIV Scrollbar to Top When iFrame SRC Changes -


re: http://www.gooplusplus.com/cost-of-living-compare-cities/

i made relatively simple web site make easier compare potential "expat" cities. there links (target=iframe) each city cost of living data, wikipedia, expat blogs, climate info, , google map.

the left column consists of several control links each city.

the main window single iframe within div. iframe scrolling set off. scrolling done using iframe's div. iframe contents external domains.

the problem: if 1 scrolls down view long wikipedia entry , user clicks on new city link, iframe content position stays @ old div position, not typically wanted.

the desired behavior (javascript, not jquery):

move div's vertical scrollbar - go top of document whenever iframe src document changes.

enter image description here

this easier more complex web sites using iframes. simple web page, body , not div control scrolling.

<iframe src="numbeo.html" onload="window.scrollto(0,0);" etc. > 

Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -