For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub
- This topic has 6 replies, 4 voices, and was last updated 13 years, 3 months ago by
MassimilianoFabbri.
-
AuthorPosts
-
MassimilianoFabbriMemberMy goal is to use the Inappbrowser capabity with PG 2.4
But I don’t want an external view to load an URL,
I need to embed the view in the main mobione view, between a Titlebar and a toolbar as footer.
Is this possible ?
Thanks.
Eudosiahttp://docs.phonegap.com/en/2.4.0/cordova_inappbrowser_inappbrowser.md.html#InAppBrowser
May 2, 2013 at 8:03 am #338746
BrandonMemberThis is possible, but only on native apps. Simply use the goto url and select the appropriate opions for controls or not.
May 2, 2013 at 9:31 am #338747
MassimilianoFabbriMemberI’m tring another solution to
use the actual html widget
to bypass the crossdomain ajax call
I userd jasonp (seem it is not affected)
page returning me from this call:$.getJSON(“http://www.yourdomain.com/?callback=?”,
function(data) {
//alert(data.result[0]);
$(“#success”).html(data.result[0]);
});In ondeviceready event I got the code above,
the page is not showing into a <div id=”success”></div>
I have created inside the html widget
Any idea ?
Thanks
EudosiaMay 2, 2013 at 11:48 am #338762
support-octavioMemberHi eudosia,
Please note that if you are testing your project in the Test Center, the cordova/PG api is not emulated and your deviceReady() callback will not be called. You can trigger the deviceReady callback using
//this function is stubbed out in the <project>-custom.js file
phoneui.documentReadyHandler = function() {
if (!phoneui.cordovaAvailable()) {
deviceReady();
}
}Also, you can use the javascript debugger to check for syntax errors and to step through callbacks to ensure your ajax and dom manipulation code is executing properly.
May 2, 2013 at 12:25 pm #338765
MassimilianoFabbriMemberThanks for you response I will check this
I tried also to put the jsonp in a button click event
but debugger returned me erros related to the loaded page
and not to the app code.
Can you show me a clean code to do cross domain ajax call using jsonp
to load a remote page into an html container ?
Thanks
EudosiaMay 7, 2013 at 1:09 pm #338890
support-michaelKeymasterLet me backup and state that if you are developing an app then you will not have cross-domain restriction for request your remote content. This assumes your are not making the request directly from the app and not a childbrowser. The cross-domain restriction does not apply because html5 apps load directly from the local file system, e.g., file://
It is very likely you will encounter a cross-domain issue if you are performing ajax request or form submission from your desktop browser. Here again you can get around this. For example if you are using the Test Center then you can disable web security from the toolbar. If you are testing from Chrome you can provide a commandline arg (google for the commandline flags) to disable or use the chrome dev tools.
I would rather discuss why you have a cross-domain issue before chasing jsonp issues that may be irrelevant.
May 7, 2013 at 1:54 pm #338892
MassimilianoFabbriMember@support-wayne wrote:
Let me backup and state that if you are developing an app then you will not have cross-domain restriction for request your remote content. This assumes your are not making the request directly from the app and not a childbrowser. The cross-domain restriction does not apply because html5 apps load directly from the local file system, e.g., file://
It is very likely you will encounter a cross-domain issue if you are performing ajax request or form submission from your desktop browser. Here again you can get around this. For example if you are using the Test Center then you can disable web security from the toolbar. If you are testing from Chrome you can provide a commandline arg (google for the commandline flags) to disable or use the chrome dev tools.
I would rather discuss why you have a cross-domain issue before chasing jsonp issues that may be irrelevant.
I don’t understand your point, but my issue seems to me clear:
1 I have an online site
2 I have my ‘inbrowser’ app
3 I would to load a page from my site
into the html widget (using no iframes)
in my Mobione app
4 can’t allow (for security reasons) the cross domain header in my pages.Which is the solution with Mobione ?
Thanks in advance -
AuthorPosts
