facebook

How do I display a web page

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

    donij
    Member

    Hi,

    In my application after submitting a form the server redirects me to http://www.google.com. How do I display this page on the phone app.

    Thanks

    #335303 Reply

    donij
    Member

    Hi Octavio/Wayne,

    please any help on this. Am stuck until I get this resolved. Please help. Thanks.

    #335318 Reply

    donij
    Member

    Please help!!!

    #335327 Reply

    @donij,

    There is no general support for embedding arbitrary remote site in a mobione app. See this article: http://www.genuitec.com/support-genuitec/viewtopic.php?f=14&t=3600

    #335332 Reply

    donij
    Member

    Thanks Octavio. That is really a dead end! Does this also affect image capture in mobione as I posted in topic “image capture”?

    #335372 Reply

    donij
    Member

    Hi Octavio, Could it be possible to get the site dom structure returned by the redirect and pass it to the phone web browser using phoneui ….. just like you have the code when you click a link to a site liike this….

    phoneui.showURL('http://www.google.com', '_self', {});

    Appreciate your response.

    THANKS

    #335397 Reply

    donij
    Member

    Hi Octavio,

    I will really appreciate a response if this will give a better picture of what am trying to achieve. I have read some details about phonegap childbrowser plugin that allows the application to detect a location change with the onLocationChange callback (or event).

    For example…

    if I submit a form by the click of a button.
    The form gets submitted to the required url but the response is a redirect to an external page.
    Is there any way that mobione/phoneui detect the redirected/location change so that either the new url is captured and then we can use code like

    phoneui.showURL('http://theredirectedurl', '_self', {});

    In the case of phonegap it uses the childbrowser plugin to do this. Do we have such with mobione.

    Thanks a mil. Response greatly appreciated.

    #335400 Reply

    @donij,

    If I recall well, it is the same code used in this tutorial: http://www.genuitec.com/support-genuitec/viewtopic.php?f=14&t=3203

    So, it should works 🙂

    #335436 Reply

    Brandon
    Member

    If Im not mistaken the form response is passed back as the data variable.
    If it is you should be able to use that if it is returning you url in your phoneui.postSubmitForm_m1_<screenname> = function.

    phoneui.showURL(data, '_self', {});
    #335457 Reply

    donij
    Member

    Thanks guys for your response. I have gone through the sample but the difficulty is that the redirect does not just send the url of the destination site.

    in my phoneui.postSubmitForm callback what I get as data is not just a url but a complete web page….. some lines of the return site is as below. If I could have a general way of extracting the destination url the I could just use

    phoneui.showURL('http://theredirectedurl', '_self', {});

    . Any ideas about how to extract the url irrespective of the redirected site.

    Thanks once again.

    Below is the data received as data in phoneui.postSubmitForm callback

    <!doctype html><html manifest="http://www.google.com.ng/?mnfst=1"> <head> <meta content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" name="viewport"><meta name="format-detection" content="telephone=no"><meta name="format-detection" content="address=no"> <title>Google</title> <style>#logo span,.lsb{background:url(/images/nav_logo117.png)
Viewing 10 posts - 1 through 10 (of 10 total)
Reply To: How do I display a web page

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