diff --git a/metadata/dbms/editrecord.js b/metadata/dbms/editrecord.js
index 4ada59d..087c0be 100644
--- a/metadata/dbms/editrecord.js
+++ b/metadata/dbms/editrecord.js
@@ -53,6 +53,7 @@ class EdtRec
this.pBarDiv.innerHTML='
';
let eDiv=document.getElementById('eDiv'+this.uid);
+ if(eDiv==null) return;
eDiv.appendChild(this.pBarDiv);
}
};
@@ -399,7 +400,7 @@ class EdtRec
{
if(opt.nodeName=="option")
{
- option = document.createElement("option");
+ let option = document.createElement("option");
option.setAttribute("value",opt.getAttribute("val"));
option.appendChild(document.createTextNode(opt.getAttribute("d")));
select.appendChild( option );
@@ -1039,6 +1040,7 @@ class EdtRec
let nodeType=findFirstNode(node, 'type');
prop_name=nodeType.getAttribute("pn"); //field name
prop=document.getElementById("prop_"+this.uid+"_"+prop_name);
+ if(prop==null) return;
let selector=null; //find what kind of object object
let nodeFilter=findFirstNode(this.nodeMetadata, 'properties');
diff --git a/metadata/dbms/tools.js b/metadata/dbms/tools.js
index 5fe14a7..416ab94 100644
--- a/metadata/dbms/tools.js
+++ b/metadata/dbms/tools.js
@@ -209,6 +209,7 @@ function alert2(title,text,okFunc=null)
win.setContent(html);
let obj=document.getElementById(win.uid+'_close');
+ obj.focus();
if(obj!=null) obj.onclick=function(win,okFunc){return function(){ win.Close(); if(okFunc!=null) okFunc(); };}(win,okFunc);
win.setSize("300px","150px");
win.setCenter();
@@ -237,6 +238,7 @@ function confirm2(title,text,okFunc,cancelFunc)
win.setContent(html);
let btnO=document.getElementById(win.uid+'_ok');
+ btnO.focus();
if(btnO!=null){
btnO.onclick=function(win){
return function(){