Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by John-Olav Hoddevik on Apr 15, 2008 13:13
open dhtmlx forum
setOnClickHandler

My code looks like this:
aToolBar.setOnClickHandler(doButtonClick);
function doButtonClick(itemId,itemValue)
{ alert(itemId); }

This does not seem to work. Instead I get this Javascript error:
Error: that.persAction is not a function
Source File: http://www.otshop.no/js/dhtmlxToolbar/codebase/dhtmlxprotobar.js
Line: 10
Answer posted by Support on Apr 16, 2008 01:49
Please be sure that next command
    aToolBar.setOnClickHandler(doButtonClick);
was called before xml with configuration loaded ( or before buttons added by script )

>> Error: that.persAction is not a function
Such error can occurs if you are using
    menu.setItemAction
with non function parameter.