var cw = iframe.contentWindow;
if (typeof iframe.contentWindow.wrappedJSObject != 'undefined') cw = iframe.contentWindow.wrappedJSObject;
cw.IAMXUL = true; cw.xulG = content_params;
+ setTimeout( function() { if (typeof cw.default_focus == 'function') cw.default_focus(); }, 0 );
} catch(E) {
this.error.sdump('D_ERROR','E: ' + E + '\n');
}
if (typeof iframe.contentWindow.wrappedJSObject != 'undefined') cw = iframe.contentWindow.wrappedJSObject;
cw.IAMXUL = true; cw.xulG = content_params;
this.error.sdump('D_DECK', 'cw = ' + cw + ' cw.xulG = ' + js2JSON(cw.xulG) );
+ setTimeout( function() { if (typeof cw.default_focus == 'function') cw.default_focus(); }, 0 );
} catch(E) {
this.error.sdump('D_ERROR','E: ' + E + '\n');
}
}
function default_focus() {
- try {
- document.getElementById('checkout_barcode_entry_textbox').focus();
- } catch(E) {
- g.error.sdump('D_ERROR','checkout default_focus(): ' + js2JSON(E));
- }
+ setTimeout(
+ function() {
+ try {
+ var x = document.getElementById('checkout_barcode_entry_textbox');
+ if (x.disabled) {
+ document.getElementById('checkout_duedate_menu').inputField.focus();
+ } else {
+ x.focus();
+ }
+ } catch(E) {
+ g.error.sdump('D_ERROR','checkout default_focus(): ' + js2JSON(E));
+ }
+ }, 0
+ );
}
function refresh() {