facebook

inappbrowser

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #338743 Reply

    My 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.
    Eudosia

    http://docs.phonegap.com/en/2.4.0/cordova_inappbrowser_inappbrowser.md.html#InAppBrowser

    #338746

    Brandon
    Member

    This is possible, but only on native apps. Simply use the goto url and select the appropriate opions for controls or not.

    #338747

    I’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
    Eudosia

    #338762

    Hi 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.

    #338765

    Thanks 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
    Eudosia

    #338890

    support-michael
    Keymaster

    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.

    #338892

    @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

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: inappbrowser

You must be logged in to post in the forum log in