external views loaded from another domain

3 posts, 0 answers
  1. Dil
    Dil avatar
    2 posts
    Member since:
    Oct 2013

    Posted 18 Oct 2013 Link to this post

    Hi there,

    I am working on a mobile application to be deployed with cordova and am very excited about the Kendo Mobile UI. I have been playing with it for a couple of days and have this burning issue: When I try to load external view from local file on my machine everything runs smoothly but I was thinking of loading URLs remotely from the web site and keep the main kendo UI within the mobile application. So I figured I would just load the appropriate on the local application from the remote domain. But when I try to load a view with the full domain path like that:
    <a data-role="button" href="http://www.comain.com/mobile_url.html" style="background-color: green">Go to</a>
    The browser freezes and the view is not loaded. Does that mean that I can only include local files? If yes, maybe I can load external content with Ajaxor somethng of the sort? Or maybe there is a better approach I am missing?

    And a second question - is there a way to tell kendo if a regular <a href... anchor should point to a view, or to a standard html page?

  2. Kiril Nikolov
    Kiril Nikolov avatar
    2596 posts

    Posted 22 Oct 2013 Link to this post

    Hi Dilyan,

    I am really glad to hear that you are happy with our product.

    As for your question - first check the console in your browser's developer tools, for any JavaScript errors. Do you see any? It should not be a problem loading remote views, as it will actually execute Ajax request in the background in order to fetch the view. You can check this demo, where it is shown how to load a remote view in Kendo UI Mobile:


    I would also like to recommend to take a look at the following documentation article, explaining how to create a link to external pages:


    Kiril Nikolov
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Dil
    Dil avatar
    2 posts
    Member since:
    Oct 2013

    Posted 22 Oct 2013 Link to this post

    Hi Kiril,

    Thanks for your answer. I had already went through that documentation but the console suggestion was a life-saver! Turned out that I was getting  Access-Control-Allow-Origin error. I had to resort to header('Access-Control-Allow-Origin: *'); to allow access and now everything is fine.

    I had one other thing to clear regarding the anchor links in Kendo, but after a bit of testing I solved my issue, so everything works great for now. 

    Thanks again and have a good day!
Back to Top