Bug Tracker

Modify

Ticket #3428 (closed bug: invalid)

Opened 5 years ago

Last modified 4 years ago

.load and script in tag <script>

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

Description

Not working

Attachments

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

Change History

Changed 5 years ago by allcity

Open page test.html

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

Replying to allcity:

Not working

What is the expected functionality here.

comment:2 Changed 5 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 5 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 4 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to invalid

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.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.