krishna
krishna

Reputation: 923

Controlling scrolling in iframe

Can you help me with my problem regarding iframe because whenever the iframe is scrolled till end, and the user clicks a control inside the page within iframe, and page content is on the top of the page, the user needs to scroll up the iframe just to see the content.

Are there any properties that I can set or code that I can do so that the iframe scroll bar goes back to top whenever an event is triggered inside the form?

Upvotes: 2

Views: 497

Answers (1)

Thariama
Thariama

Reputation: 50832

Depending on the platform and browser you use you could call on the iframe window (triggered by an event):

window.scrollTo(0, 0);

Upvotes: 2

Related Questions