开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜