IFRAME and reloading back the page to the top

I was trying to solve my way around a nuisance.. On web portal that I am working on, there exists the need to use an IFRAME in order to interface two difference platforms.

So, far things were going great but when I was submitting a long form, the new page that came as result would not be visible unless the user would manually wind up the browser window all the way to the top.

Tried out a few things until I finally found a working solution: using the "onload" event triggered by the IFrame and some java script.

So the end result to get neat looking pages is:

<iframe src="http://localhost?display=register" onLoad="window.parent.scroll(0,0);"></iframe>

And this way you get yourself back to the top of the page every time that a new page is requested inside the iframe window. Problem solved.

Take care!

:)