I haven't used a partial load in a while, but could it be you have a
typo:
$("#load_target").load("has_script.htm #script");
Should be:
$("#load_target").load("has_script.htm", "#script");
Adrian
On Oct 6, 4:24 am, ctford <[EMAIL PROTECTED]> wrote:
> When I use .load() to pull in a whole page, script tags are correctly pulled
> in and executed. However, if I add a selector to the .load() call all script
> tags get stripped out. In the following example, the heading from the second
> HTML file gets pulled in, but the JS with the alert does not. Could this be
> a bug?
>
> <html>
> <head>
> <title>Ajax</title>
> <script type="text/javascript"
> src="jquery-1.2.6.min.js"></script>
> </head>
>
> <body>
> <div id="load_target"></div>
> <script type="text/javascript">
> $("#load_target").load("has_script.htm #script");
> </script>
> </body>
> </html>
>
> <html>
> <head>
> <title>Script</title>
> </head>
>
> <body>
> <div id="script" >
> <h1>Heading</h1>
> <script type="text/javascript">
> alert('Hi');
> </script>
> </div>
> </body>
> </html>
> --
> View this message in
> context:http://www.nabble.com/Partial-load-strips-out-script-tags--tp19830989...
> Sent from the jQuery General Discussion mailing list archive at Nabble.com.