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

external views loaded from another domain

2 Answers 56 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Dil
Top achievements
Rank 1
Dil asked on 18 Oct 2013, 03:11 PM


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?

Thanks!

2 Answers, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 22 Oct 2013, 09:02 AM
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:

http://demos.kendoui.com/mobile/view/index.html#/

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

http://docs.kendoui.com/getting-started/mobile/application#linking-to-external-pages

Regards,
Kiril Nikolov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Dil
Top achievements
Rank 1
answered on 22 Oct 2013, 11:04 PM


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!
Dil
Tags
General Discussions
Asked by
Dil
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Dil
Top achievements
Rank 1
Share this question
or