views:

27

answers:

1

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 scrollbar goes back to top whenever an event is triggered inside the form??

+1  A: 

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

window.scrollTo(0, 0);
Thariama
i am using windows. iframe using for display live chat messages. whenever chat window is full with chat messages then scroller will nt come autmatically to bottom to show nem message. for this problem i used <script type="text/javascript"><!-- BEGIN HIDINGwindow.onload = pageScroll; function pageScroll() {window.scrollBy(0,1000000);scrolldelay = setTimeout('pageScroll()', 300);/* Increase this # to slow down, decrease to speed up scrolling */}// DONE HIDING--></script> for supose i want to see chat messages from starting scroller is not going top of the iframe
muralikalpana