Browse files

adding slider and webView callback

  • Loading branch information...
1 parent 3b8512e commit f8e8f351ebdf097dcce3ed57d1190246f483fe49 @aaronksaunders committed Mar 20, 2011
Showing with 19 additions and 1 deletion.
  1. +19 −1 Resources/app.js
View
20 Resources/app.js
@@ -11,12 +11,30 @@ var win1 = Titanium.UI.createWindow({
title:'Tab 1',
backgroundColor:'#fff'
});
+
+var webView = Ti.UI.createWebView({
+ url:'html/chart.html',
+ width:'100%',
+ height:'80%'
+});
+
var tab1 = Titanium.UI.createTab({
icon:'KS_nav_views.png',
title:'Tab 1',
window:win1
});
-
+win1.add(webView);
+var slider = Ti.UI.createSlider({
+ min:0,
+ max:11,
+ id:'work',
+ bottom: 20
+});
+slider.addEventListener('change', function(e){
+ var newValue = e.value;
+ webView.evalJS('adjustWorkValue('+ newValue + ')');
+});
+win1.add(slider);
// add tabs
tabGroup.addTab(tab1);

0 comments on commit f8e8f35

Please sign in to comment.