Calling 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 weblike.html in the below syntax.
var tab2 = Titanium.UI.createTab({
icon:'static/weblike.png',
title:'Tab 2',
url:'weblike.html',
window:win2
});
After launched the application, when i clicked the tab 2 the corresponding html file could n't be called.
Please find me solution to solve the problem.
Thanks and Regards,
Venkatesan.R
1 Answer
-
Accepted 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();