In my index.html I defined an iframe with a page from another,
external, source. In this page the same phonegap-1.1.0.js file is
included.
I made the required changes to enable loading the remote HTML page in
the Phonegap app. And that works well. In the simulator, I see the
contents from index.html, as well as the other page (application) in
the iframe. I can click on the buttons there and it works like in
Safari/Chrome/whatever. But now I would like to use the phonegap
javascript API's in that external application, for instance access
Contacts - but lets just start with getting the Device properties.
In the external page, I defined an "onBodyLoad" function that calls a
document.addEventListener("deviceready", onDeviceReady, false);
But any reference to
device.name results in an error. It seems the
"deviceready" event is never fired.
Is it possible what I would like to achieve, and what am I doing
wrong?
Environment:
PhoneGap 1.1.0
XCode 4.2
IOS Simulator 5.0
(the external application is created with Oracle Application Express
i.c.w. jQuery Mobile)
TIA.
Roel