views:

275

answers:

1

Hi All, I have a text box on a form and a calendar extendar is associated with it. When the value changes I am calling a web service with the new date. It seems as tho the textbox change event is being called twice. I have tried to track it down and it appears the even handler is only wired up once and I also tried using jQuery.unbind('change'), prior to the wire up. I think the event is actually happening twice as I leave the textbox to choose a calendar value and that value is pushed back into the text. Anyways, does anyone have any suggestions to cancel the second event? I dont want to call the web service twice. Its really not affecting the UX but I can still see it's clearly being called twice and I know that's not correct. If you have any suggestions on how to remedy this, I would like to hear them. Thanks so much for your time. Here's the js/jquery wire up code.

$("#txtToDate1").unbind('change');
$("#txtToDate1").change(UI$Calc_change);

Cheers, ~ck in San Diego