Bug Tracker

Opened 11 years ago

Closed 11 years ago

#3428 closed bug (invalid)

.load and script in tag <script>

Reported by: allcity Owned by:
Priority: major Milestone: 1.3
Component: ajax Version: 1.2.6
Keywords: Cc:
Blocked by: Blocking:

Description

Not working

Attachments (1)

bug.zip (444 bytes) - added by allcity 11 years ago.
Open page test.html

Download all attachments as: .zip

Change History (5)

Changed 11 years ago by allcity

Attachment: bug.zip added

Open page test.html

comment:1 in reply to:  description Changed 11 years ago by brandonZ

Replying to allcity:

Not working

What is the expected functionality here.

comment:2 Changed 11 years ago by allcity

Remove the script with file test2.html to file test.html as he does not work. While other tags are working with a <script> not. Can I have something wrong week.

comment:3 Changed 11 years ago by allcity

test.html


<html> <script src="http://code.jquery.com/jquery-latest.js"> </script> <script> $(document).ready(function() { $("#load_here").load("test2.html #test"); }); </script> <body> <div id="load_here"> </div> </body> </html>

test2.html


<html> <body> <script id="test"> alert("Hello!!!"); </script> <h1> Hello</h1> </body> </html>

comment:4 Changed 11 years ago by dmethvin

Resolution: invalid
Status: newclosed

You cannot run a script by injecting content inside script tags with .load. If you want you can ajax a script over as text and inject it into the page with a new set of script tags.

Note: See TracTickets for help on using tickets.