HTML
Hi,
I have created two html files namely index.html and weblike.html in the resource directory.In the main app.js file i was called the index.html in the below syntax.
var win1 = Titanium.UI.createWindow({
url:'index.html',
title:'Tab 1',
backgroundColor:'#fff'
});
After launched the application,runtime error will displayed.
Error
Location:[0,0]app://index.html
Message:Reference Error:"XML" is not defined.
Please find me solution to solve the problem.
Thanks and Regards, Venkatesan.R
1 Answer
-
Hi venkatesan
You can't set the window URL property to point to an html file. You need to use a webview. For example:
var win1 = Ti.UI.createWindow({ title:'Tab 1' }); webView = Ti.UI.createWebView({ url:'index.html', backgroundColor:'#fff' }); win1.add(webView); win1.open();