I have a script that runs a clickable calendar date field, and this script is being called in a form that is passed through AJAX.
When the form html is returned from the AJAX script, it is added to the page and displayed. The problem is that the script (which cames after the input field it is referring to) is trying to look for said input field and is failing to find it. This leads me to believe that the javascript is being run before the html has been fully integrated into the page, which is also why there is nothing shown on the page when the errors pop up. Here is a sample of the script that is being run: <input name="startedDate" id="f-calendar-field-8da04fa6e1" class="datedDate" value="1969-12-31" type="text" /><a href="#" id="f- calendar-trigger-8da04fa6e1"><img border="0" src="./jscalendar/ calendar.png" alt="Select Date" /></a><script type="text/ javascript">Calendar.setup({ "ifFormat" : "%Y-%m-%d", "daFormat" : "%Y/ %m/%d", "firstDay" : 0, "showOthers" : true, "inputField" : "f- calendar-field-8da04fa6e1", "button" : "f-calendar- trigger-8da04fa6e1"} );</script> Is there a way to delay eval of the scripts until after the html content has been integrated into the page?