I use a third party iframe src, and I want to submit my form when the Iframe src change... how to trigger the submit button when the inner Iframe source change?
Asked
Active
Viewed 463 times
2 Answers
0
how to trigger the submit button when the inner Iframe source change?
You can't access iframe content if it belongs to different domain.
I use a third party iframe src
So defenitly not as its other domain
Also from w3school
Note: Because of security reasons, the contents of a document can be accessed from another document only if the two documents are located in the same domain.

Manish Kumar
- 10,214
- 25
- 77
- 147
-
thank you, but if I create the iframe, cant I use a function that check if the src of my iframe has changed? – Holy Moses Feb 15 '14 at 18:32
-
check this http://stackoverflow.com/questions/4977930/is-it-possible-to-tell-if-the-src-of-an-iframe-has-changed and http://stackoverflow.com/questions/2235994/how-to-determine-if-the-location-of-the-iframe-has-changed – Manish Kumar Feb 15 '14 at 18:35
-
In second link check @Daniel Vassallo answer he is saying same thing that i told.. try this also http://stackoverflow.com/questions/9372391/alert-when-iframe-url-changed – Manish Kumar Feb 15 '14 at 18:36
0
I changed the redirected page and add on it
<body onload="parent.parent.send()">
On the main page (where the iframe located) I add:
<script>
function send()
{
document.getElementById("gform_1").submit();
}
</script>
It solve my problem.

Holy Moses
- 65
- 7