onload event callback problem for an iframe dom element in phonegap
Using this sample code:
var callBack = function(evt){
alert("Inside callback")
}
anIframe.addEventListener("load", callBack, false);
The above code doesn't seem to work in Phonegap-Iphone. The callback function is not called ev开发者_StackOverflowen if the iframe element has been loaded in the DOM.
Use this to the load iFrame http://denrobapps.com/2010/12/phonegap-and-iframes/ and then use postMessage to communicate between the iFrame and the PhoneGap window.
Or load the iFrame with this: Allow external hosts in iframe on xcode 4.1 using phonegap
精彩评论