No, I used the 'places the scripts at the end of the inserted HTML' method that I didn't want to use.
It works, but this may be something that the developers will want to tweak. Thanks for all your suggestions though. On Sep 21, 4:18 am, Andy <[EMAIL PROTECTED]> wrote: > Benjam, > > Did you have any luck resolving this issue other than using the > setTimeout method? > > thanks. > > On Sep 17, 11:20 pm,benjam<[EMAIL PROTECTED]> wrote: > > > 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?