I have two Item handlers (OnReplicantAdded and OnItemChange) defined for the same function. Is there a way for me to recongize which event is triggered at a given time so that I can handle a portion of the code differently.
function rep_add_handler(item){ do_stuff(item, "rep");}function on_chg_hander(item){ do_stuff(item, "chg");}function do_stuff(item, type){ ... if (type == "rep"){ ... } else{ ... } ...}
I sugest you create two superficial wrapping functions and then a common function that can take multiple parameters - something like:function rep_add_handler(item){ do_stuff(item, "rep");}function on_chg_hander(item){ do_stuff(item, "chg");}function do_stuff(item, type){ ... if (type == "rep"){ ... } else{ ... } ...}
Thanks for your help.
or you can try like that[left]function rep_add_handler(item){[/left]do_stuff(item, "rep");}function on_chg_hander(item){do_stuff(item, "chg");}function do_stuff(item, type){...if (type == "rep"){alert("Ha Ha Ha Ha")}else{alert("Oh My ****........")}...}So that way you can recognize the event. else you need to install the 3rd part Event Manager and it will return the Event name and params. i used in my earlier assignment.ThanksRG