//Called when application is started. function OnStart() { app.LoadScript("DlgNewFolder.js") lay = app.CreateLayout( "Linear", "VCenter,FillXY" ); btn = app.CreateButton( "Create a new Folder", 0.3, 0.1, "Alum" ); btn.SetOnTouch(CreateNewFolder); lay.AddChild( btn ); app.AddLayout( lay ); } //Create a new Dialog function CreateNewFolder() { // Change the path if you need DlgNewFolder = new NewFolderDialog("/mnt/sdcard/"); DlgNewFolder.Show(); }