Small fix to avoid ajax hangups after nonexistent element update.
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Mon, 10 Nov 2008 18:22:02 +0000 (18:22 +0000)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Mon, 10 Nov 2008 18:22:02 +0000 (18:22 +0000)
js/utils.js

index fca82d03c069af2f8e1acaf82ab34caaeafd560d..877af9ad60cc4eab67c98fe540724e2d56512538 100644 (file)
@@ -56,6 +56,7 @@
 //                             debug(cmd+':'+property+':'+type+':'+id);
                        // seek element by id if there is no elemnt with given name
                          objElement = document.getElementsByName(id)[0] || document.getElementById(id);
+                         if(!objElement) continue;
                  if(cmd=='as') {
                                  eval("objElement.setAttribute('"+property+"',"+data+");");
                          } else if(cmd=='up') {