javascript - Watching for a message in an iframe -


i'm wondering if there's way in javascript/angularjs out message of sort when appears in iframe. example have form in iframe, , complete form , tells me i've completed it, there way detect via js?

any help/suggestions appreciated, thank you. :)

outside iframe listen event

      window.addeventlistener( "message",           function (e) {                  alert(e.data);               },false); 

within iframe trigger event

      window.postmessage('form complete'); 

Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -