The problem is...   the code is not generated by me, it is generated
by a PHP function.
As I stated in my first post, when I move the script to the bottom of
the code block, below the form tag, it runs fine.  But I don't want to
do that.

And this is just exposing an underlying issue of script not being
executed in the proper order.

I am also having issues in certain situations where the callback
function for fadeIn (and show) is executing before the element is
faded in all the way.

These two things may or may not be related.

~Benjam

On Sep 18, 9:30 am, Liam Byrne <[EMAIL PROTECTED]> wrote:
> Place the code into a function and then call that function immediately
> after the HTML is injected.
>
> L
>
>
>
> Benjam Welker wrote:
> > I posted about this yesterday, but it never showed up...
>
> > I have a script that grabs some HTML (with included javascript) via AJAX
> > and injects the HTML into the page.  The problem is that the scripts
> > within that HTML block get executed before the HTML that it is
> > referencing is inserted into the page (and therefore missing from the DOM).
>
> > How can I pause execution of the script until the HTML is fully inserted
> > into the DOM?
>
> > The script is located in the HTML after the HTML it is referring to...
> > e.g.-
> > form
> > input id=a
> > script for element with id=a
> > /form
>
> > When I move the scripts below the form tag, the script executes as it
> > should and everything works.
> > But this method is a work-around, and I'd rather not do it this way.
>
> > ~Benjam
>
> --
> Regards,
> Liam
>
> ------------------------------------------------------------------------
> Liam Byrne
>
> *OnSight.ie
> */Winner of Limerick City Enterprise Board's "Best New Technology
> Business 2004" Award
> /
> web:http://www.onsight.ieemail: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
> phone: 061 22 99 86
> mobile:087 2730 270

Reply via email to