This is a migrated thread and some comments may be shown as answers.

How to create an app that uses multiple html files?

1 Answer 229 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
bit
Top achievements
Rank 1
bit asked on 29 Jun 2012, 08:27 PM
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.

1 Answer, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 04 Jul 2012, 11:01 AM
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!
Tags
General Discussions
Asked by
bit
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Share this question
or