• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 769
  • Last Modified:

Retaining IFRAME Contents after Postback

Please can someone advise the best way of retaining the contents of an IFRAME within a form when the form is posted back.  The IFRAME is built from scratch so loses its contents (specifically values within a form within the IFRAME).  

I suppose that it may be possible to use an event (which one would track immediately before Postback or do I need an OnClick/Change for every element which generates a PostBack?) and then javascript to read the IFRAME form contents into something (session variables) and stick them back in later but this seems a long way around it!!

Many thanks for your time.
0
antdow
Asked:
antdow
1 Solution
 
GavinMannionCommented:
I think your long way around is your best bet.

Since the IFrame cannot tell when the parent is going to postback there is no real way for it to handle itself. You can run a javascript function called on the onunload event and then handle it from there.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now