The success callback function is called twice, not able to understand this behavior.
$.get("getDetails", {
selCity : $("#selCity")[0].value}, function(data) {
alert("reached here");
$("#myform").html("");
$("#myform").html(data);
initiateDatePicker();
});
The following statements are executed twice :
alert("reached here");
$("#myform").html("");
$("#myform").html(data);
initiateDatePicker();
What is wrong in the above code? Or M I missing out something?
Thanks,
Shikha
As pointed out by @Musa, the issue was because of alert. Replacing alert by console.log for debugging.