I a form page in an iFrame that when a user submits it brings up a thank you page. But when the thank you page loads, because the initial form page is long users don't get to see the thank you message on the thank you page. So what I want to do is make the whole page with the iFrame scroll back to the top when the thank you page loads. Any ideas? thanks

Member Avatar

diafol

Use ajax instead of an iframe.

Because the action is happening inside the iframe the container remains unaware that anything has happened. You'll notice that the iframe dimensions do not resize automatically - due to it being under the blind, oblivious control of the container page.

Could I ask why are you using an iframe? Do you really need it? Unless it's to embed a remote page or instead of an 'object', you could probably do without it.