dhtmlx window - getElementById(id) is null after closing dht


first my code:

a) my form:

    <? echo $_LANG["fm_email"]; ?> *


<? echo $_LANG["fm_mandatory"]; ?>


    <input type=“button” class=“button” value="<? echo $_LANG["bt_create"]; ?>" onclick=“checkForm(‘insert_user’, ‘email’))” />

b) checkForm()

function is in a js-file include already in -area:

checks, if field email is not null

part of checkform:

document.getElementById(“msgbox”).innerHTML = getContent(“ajax/get_language.php”, “word=er_mandatory”);                



return false;

c) messagebox:

d) my dhtmlx window:    

my problem now: if i click on button in formular, dhtmlx win shows up with a message. this is what i want. but, if i click another time on button in formular, a js-script error occurs “document.getElementById(‘msgbox’) is null”. it seems, that this div does not exist. thanks for your help.




Right, it is happens because closing window affects on attached objects: they close too.
Try to use hiding window instead of closing.