How to create an app that uses multiple html files?

2 posts, 0 answers
  1. bit
    bit avatar
    1 posts
    Member since:
    Jun 2012

    Posted 29 Jun 2012 Link to this post

    Or am I supposed to put all of the code on one page? Every time I try to use href to link to another html file that has kendo code in it, it links to #nameofhtmlfile.html on the same page (meaning it doesn't go anywhere and just appends #nameofhtmlfile.html at the end of the current url.

    Please help! :(

    Edit: To clarify: In Kendo, to go to the next page, you need both of the "pages" in one html file and then use some sort of event to send you to the next 'page'. I wanna put the 'pages' in separate html files if possible.
  2. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2895 posts

    Posted 04 Jul 2012 Link to this post

    Hello,

    Could you please clarify what do you mean by "page"? I assume you refer to the View component of mobile application. 
    You are not supposed to put all of the code in one file, it is possible to divide the application views into separate files and load them as a "remote view". Actually there is an online demo that demonstrates this scenario. The most important parts are:
    • linking to the remote view - if the navigational widget href attribute value does not start with a hash (#), the application considers the View to be remote, and issues an AJAX request to the provided URL.
      <ul data-role="listview" data-style="inset">
          <li><a href="remoteview.html">Remote View</a></li>
      </ul>
    • remote view markup
      <!-- remoteview.html -->
      <div data-role="view" id="remoteview" data-layout="mobile-view" data-title="Remote View">
          <p>Hi, I'm a remote view.</p>
      </div>

    In addition I would recommend checking the Remote Views help article from the documentation - it gives a more detailed information about how loading of remote views works.

    I hope this information will help.

    Regards,
    Alexander Valchev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top