exports.getCourseViewpack = function(){ //Creates a new window var win11 = Ti.UI.createWindow({ //Ti.UI.orientation = Ti.UI.LANDSCAPE_LEFT, height:height, width:width, backgroundColor: '#A3A375', statusBarHidden:true, tabBarHidden:true, navBarHidden:true, fullscreen:true }); win11.orientationModes = [Ti.UI.LANDSCAPE_LEFT]; var courseview1 = Titanium.UI.createWebView({ url:'', borderRadius:10, backgroundColor:'#8F5500', scalesPageToFit:true, contentWidth:'auto', contentHeight:'auto', opacity:1 }); win11.add(courseview1); var mm1=Ti.Filesystem.applicationDataDirectory+ 'lms_api.html'; var file1 = Titanium.Filesystem.getFile(mm1); courseview1.url= file1.nativePath; //url from data directory alert("Hi......"); return win11; };when I loaded above page then the alert shows 2 times means it is loaded 2 times.I want it load only one time.How to achieve this?
↧
webview loading problem
↧