Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

iframe form with parent refresh 1

Status
Not open for further replies.

jmcg

Technical User
Jun 30, 2000
223
GB
I have a form within an iframe that submits the data, then refreshes the parent (using parent.location.reload();).
However as the iframe is part of the refresh is goes into a loop of resubmitting the data.

Is there anyway to stop this from happening?

 
If you've got server-side code in play, why don't you not deliver the iframe once you've detected a submission?

Hope this helps,
Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

Dan's Page [blue]@[/blue] Code Couch:
Code Couch Tech Snippets & Info:
 
Sorry Dan, not sure I'm really following that one. Bit inexperienced with Javascript.

The iframe appears on the page before submission to aloow submission then after to allow another submission but is in fact resubmitting the previous data.

Not sure if that makes it any clearer.
 
If you need the iframe on both the 'before' and 'after' pages (as it sounds like you do), then you'd need to tailor the iframe content to not refresh the page on the 'after' version.

Whether this is by changing the src, setting a cookie, or some other method is irrelevant... but you need to do it to stop the loop, IMHO.



Coedit Limited - Delivering standards compliant, accessible web solutions

Dan's Page [blue]@[/blue] Code Couch:
Code Couch Tech Snippets & Info:
 
BillyRay
Thanks, that has put my in the right direction. Rather than a reload I have used the href to point to a URL.
Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top