I'm not sure about the reason why but put the script tags to the end
of file like this.

//some html here

<?php

//some code here

?>

//some html here

//jquery and javascript codes

try this it will work, I think it is related wiht async,sync working
structure of AJAX. By the way it is better if you don't use body,
head, html tags in the external page, because you already have these
tags. Browser will handle,but not necessary.

On Feb 10, 6:40 pm, adexcube <alfonsoenci...@gmail.com> wrote:
> As a progress, the javascript functions are executed only if they're
> inside the <body> tags of the remote file!!
>
> Does someone know why?
>
> On 10 Feb, 16:17, Michael Lawson <mjlaw...@us.ibm.com> wrote:
>
>
>
> > I do have somewhat limited experience with this but the documentation says
>
> >LoadHTML from a remote file and inject it into the DOM.
>
> > in reference to theloadfunction, so I would think it's working as
> > intended in only loading the html, not doing anything with it.
>
> > cheers
>
> > Michael Lawson
> > Content Tools Developer, Global Solutions, ibm.com
> > Phone:  1-919-517-1568 Tieline:  255-1568
> > E-mail:  mjlaw...@us.ibm.com
>
> > 'Examine my teachings critically, as a gold assayer would test gold. If you
> > find they make sense, conform to your experience, and don't harm yourself
> > or others, only then should you accept them.'
>
> >   From:       adexcube <alfonsoenci...@gmail.com>                           
> >                                      
>
> >   To:         "jQuery (English)" <jquery-en@googlegroups.com>               
> >                                      
>
> >   Date:       02/10/2009 11:12 AM                                           
> >                                      
>
> >   Subject:    [jQuery] Re:loadpage which includes swf and js functions      
> >                                     
>
> > Well a simple test is to put an onload function in the body, it just
> > simple doesn't work :(
>
> > test.php
> > ...
> > <body onload=alert('loaded')>
> > ...
>
> > On 10 Feb, 16:01, Michael Lawson <mjlaw...@us.ibm.com> wrote:
>
> > > Are the functions actually being called?  Which function are you trying
> > to
> > > use?
>
> > > cheers
>
> > > Michael Lawson
> > > Content Tools Developer, Global Solutions, ibm.com
> > > Phone:  1-919-517-1568 Tieline:  255-1568
> > > E-mail:  mjlaw...@us.ibm.com
>
> > > 'Examine my teachings critically, as a gold assayer would test gold. If
> > you
> > > find they make sense, conform to your experience, and don't harm yourself
> > > or others, only then should you accept them.'
>
> > >   From:       adexcube <alfonsoenci...@gmail.com>
>
> > >   To:         "jQuery (English)" <jquery-en@googlegroups.com>
>
> > >   Date:       02/10/2009 10:50 AM
>
> > >   Subject:    [jQuery]loadpage which includes swf and js functions
>
> > > Hi, I'm trying toloada remote page usingloadfunction
>
> > > $('#middle').load("test.php");
>
> > > that page (test.php) has javascript functions that embed an swf using
> > > swf plugin.
> > > The problem is that it only loads html content and doesn't execute any
> > > javascript function.
>
> > > Any ideas?
>
> > > Thanks
>
> > >  graycol.gif
> > > < 1KViewDownload
>
> > >  ecblank.gif
> > > < 1KViewDownload
>
> >  graycol.gif
> > < 1KViewDownload
>
> >  ecblank.gif
> > < 1KViewDownload

Reply via email to