From: Janusz Dobrowolski Date: Sat, 11 Feb 2012 20:06:21 +0000 (+0100) Subject: Fixes for IE7/8 to avoid problems with javascript on some screens. X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=3ea34adfc1e7d94d59e52fb5fa5b704063940709;p=textcart.git Fixes for IE7/8 to avoid problems with javascript on some screens. --- diff --git a/js/inserts.js b/js/inserts.js index e15da1e..0db3c71 100644 --- a/js/inserts.js +++ b/js/inserts.js @@ -508,7 +508,7 @@ function setHotKeys() { ev.returnValue = false; return false; } - if (editors && editors[key]) { + if (editors!=='undefined' && editors[key]) { callEditor(key); return stopEv(ev); // prevent default binding } diff --git a/js/utils.js b/js/utils.js index a801a13..cd41633 100644 --- a/js/utils.js +++ b/js/utils.js @@ -119,7 +119,7 @@ JsHttpRequest._request = function(trigger, form, tout, retry) { } else if(cmd=='fc') { // set focus _focus = data; } else if(cmd=='js') { // evaluate js code - eval(data); + setTimeout(function(){eval(data)}, 200); // timeout required by IE7/8 } else if(cmd=='rd') { // client-side redirection window.location = data; } else if(cmd=='pu') { // pop-up @@ -352,4 +352,4 @@ function element_pos(e) { // parentNode has style.display set to none if (parentNode != document.documentElement) return null; return res; -} \ No newline at end of file +}