.load

Try this... set up one page called test.html that has in the body:

<div id='test'></div>
<script language="javascript" type="text/javascript">
    $('#test').load('test.html');
</script>

Create a page called ajax.html in the same folder as the above page.
It's only source should be:

<div>Test Data</div>
<script language="javascript" type="text/javascript">
    alert('hi');
</script>

Load up test.html in your browser.

If you get the alert, scripts are loading and the problem is in
whatever javascript is in the loaded page.

If you don't get the alert, you might need to manually set the
datatype to html.

Hamish


On Apr 29, 12:04 pm, hubbs <[EMAIL PROTECTED]> wrote:
> Did you use .load or .ajax?  I used .load and it does not work...
>
> On Apr 28, 3:49 pm, Hamish Campbell <[EMAIL PROTECTED]> wrote:
>
>
>
> > I've tried it myself - put an alert into the script and you should see
> > something happen. jQuery executes script tags on load, but you won't
> > see it in generated source regardless.
>
> > On Apr 29, 10:33 am, hubbs <[EMAIL PROTECTED]> wrote:
>
> > > I am using Firefox and web developer toolkit, then viewing generated
> > > source.
>
> > > Hamish Campbell wrote:
> > > > How are you viewing the generated source?
>
> > > > Bare in mind that just because you can't see javascript in the browser
> > > > source of a page doesn't mean javascript hasn't been executed.
> > > > Likewise, you wouldn't see the html loaded from an ajax call in the
> > > > browser source -- as it was injected after the page was initially
> > > > served.
>
> > > > Put something like alert('loaded!!!') into the js to be loaded and see
> > > > if you get a result.
>
> > > > Also - you can use an invisiable proxy such as Charles (http://
> > > > xk72.com/charles/) to view the raw data moving between the browser and
> > > > server during the call.
>
> > > > On Apr 29, 7:45�am, hubbs <[EMAIL PROTECTED]> wrote:
> > > > > I am loading in some content using .load, and have also used the
> > > > > normal ajax function. �It seems that all my javascript that is within
> > > > > this content is being stripped out when I view the generated source,
> > > > > is this the case?!
>
> > > > > If so, can I get around this?- Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -

Reply via email to