HTML Container Content

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

    Pascal Curdy

    Hi there,

    I’m quite new in MobiOne development and I find it’s a cool IDE for rapid development.

    I’m currently developing an hybrid app. As so, I use an HTML Container with an <iframe> pointing to
    the url of the page I want to display.

    The content of the HTML Container (HTML Code) will vary, depending on the selected (clicked) MenuItem.

    How can I change the content of the HTML Container from within the onClick event function located in the MYApp_custom.js module ?

    Thanks in advance for your help

    Best Regards.

    #349695 Reply

    Hi pascal,

    First of all, please note that we discourage the use of iframes, see the reasons here

    Now, for changing the html content when combobox value is changed, something like this should works:

    var cmbVal= $('select[name="combobox1"]').val();
    $('#m1-<project>-<htmlwidgetID>').html("<div>code for 1</div>");

    Update: I realize you are not using a combobox, please specify what widget you are using so I can provide the correct snippet for that.

    #349698 Reply

    Pascal Curdy

    Hi octavio,

    Thanks for your answer.
    I just want to change the whole html code of an HTML container dynamically,
    depending on the selected page.

    $(‘#m1-<project>-<htmlwidgetID>’).html(“<full page code>”);

    is exactly what I need.

    Since I’d better not using <iframe> the only solution is to integrate the full HTML
    code of the page instead of using <iframe>.

    This will increase the size of the App, so it will take a little longer to load at startup, but
    it will decrease the response time when the user selects a particular page.

    This will also decrease the amount of communication data which is, to my opinion, not a bad thing…

    Thanks again for your support


    #349729 Reply

    Hi pascal,

    You can save the html code in independent files and get the data thru a http request, this example might be helpful for you: http://www.genuitec.com/support-genuitec/viewtopic.php?f=14&t=5738

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: HTML Container Content

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