iframe communication with the parent frame?

If I have a small html form in an iframe, can the outside frame tell whether that form has been submitted?
tpchaiAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
OpalelementConnect With a Mentor Commented:
If the frame src is on the same server as the parent, you can make the frame run a function when the form is submitted. If they are on different servers, you will have alot more issues.

[iframe code]
<form onsubmit="parent.function();">
[/iframe code]
0
 
b0lsc0ttIT ManagerCommented:
tpchai,

When will you check?  If you want to know right when the form is submitted then the expert above's suggestion is best.  If you want to find this out at some other point then you could probably use different code.  For example the outside frame would know the form was submitted when it looks for the page name of the page in the frame or its contents.  If the latter is the case and you want details then please let me know what happens when you submit the page.

Let me know if you have any questions or need more information.

b0lsc0tt
0
 
tpchaiAuthor Commented:
Thanks, I just need a button to change in the parent frame, this worked fine.
0
All Courses

From novice to tech pro — start learning today.