I keep messing around with the order of actions (creating/hiding/destroying windows), re-reading the wiki but just can't seem to get this to work in webclient, yet works fine in smart client. Any help greatly appreciated...
- Code: Select all
function onActionViewLocation(event) {
databaseManager.startTransaction();
linvmaster_to_linvlocationaccess.newRecord();
globals.g_locationAccessID = linvmaster_to_linvlocationaccess.linvlocationaccess_id
forms.linvlocationaccess.controller.loadRecords(globals.g_locationAccessID);
var InvActWindow = application.createWindow("InventoryAction", JSWindow.MODAL_DIALOG);
InvActWindow.title = 'Action Taken with Inventory';
InvActWindow.setSize(900,250);
InvActWindow.setLocation(100,80);
InvActWindow.resizable = true;
forms.linvlocationaccess.controller.show(InvActWindow);
forms.linvlocationaccess.elements.purpose.requestFocus();
}
function onActionSaveAndGoToLoc(event) {//In this function is where things go wrong in Webclient.
databaseManager.commitTransaction(true);
var InvLocWindow = application.createWindow("InventoryLocation", JSWindow.MODAL_DIALOG);
InvLocWindow.title = 'Tank Inventory Location';
InvLocWindow.setSize(800,450);
InvLocWindow.setLocation(100,80);
InvLocWindow.resizable = true;
forms.tanklocation.elements.btn_delInv.visible = false;
forms.tanklocation.controller.loadRecords(linvlocationaccess_to_linv);
controller.getWindow().hide();
forms.tanklocation.controller.show(InvLocWindow);
}
}
function CopyLocationAndClose(event) {
var location = 'tank:' + tank + ' sleeve:' + sleeve + ' pie:' + pie + ' vialamt:' + vialamt + ' cells in vial:' + vialcell;
application.setClipboardContent(location);
controller.getWindow().destroy();
forms.linvlocationaccess.elements.btn_Close.visible = true;
forms.linvlocationaccess.elements.btn_cancelLocation.visible = false;
forms.linvlocationaccess.elements.btn_saveToLocation.visible = false;
application.getWindow('InvActWindow');
forms.linvlocationaccess.controller.show('InvActWindow');
}