jQuery UI Datepicker with dynamic form

jQuery UI Datepicker with dynamic form

Hello,

I have two form (A,B) both has a date field that I want to use the Datepicker with. I'm able to get the Datepicker to work with form(A), I'm unable to get form(B) to work.

Form(A) display a list of entry from the database. Depending on what entry is selected in form(A), Form(B) retrieves data from database and dynamic generate an edit form. I've tried several variant but have been unsuccessful.

When a entry is select from form(A) this is fire off:

function loadEMEREdit(EMERID){
$("#EditFormWrapper").load("getEditData.cfm?ID="+ID);
$("#editTimeOffDate").datepicker();
}




Any suggestion would be greatly appreciated, thanks!