Form detachEvent

Hi,

I have a dhtmlxForm with one input box.

Am using two ways to save the data inputted.
OnChange Event that prompts user if before saving
OnCLick Event on a button on a dhtmlxToolbar that saves without prompt

The problem is that when i make changes and click on Save.
It saves , but still calls the OnChange Event

I have used, detach event but it removes the OnChange event until i refresh my page.

Pliz help.

Ndegwa | Kenya

Hi

please check here docs.dhtmlx.com/doku.php?id=dhtm … nt_handler

Thx for the reply but it doesn’t have the answer i want.

well, form just providing methods, but not define user-side logic.
for your need you need something like this:

var toolbarClick;

form.attachEvent(“onchange”, function(){
if (toolbarClick) {
toolbarClick = false;
return;
}

toolbar.attachEvent(“onclick”, function(){
toolbarClick = true;

);