Closed Bug 457080 Opened 17 years ago Closed 17 years ago

javascript not interpreted when written using DOM

Categories

(Firefox :: General, defect)

x86
Windows Vista
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 147581

People

(Reporter: davidv1992, Unassigned)

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1b1pre) Gecko/20080924033412 Minefield/3.1b1pre Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1b1pre) Gecko/20080924033412 Minefield/3.1b1pre When using the HTML Dom to insert html into a page it doesn't execute inline scripts Reproducible: Always Steps to Reproduce: 1. load the following file in mozzila: <html> <head> <title>bla</title> </head> <body> <script type="text/javascript"> document.write("<script type='text/javascript'>alert('bla');<\/script>"); </script> </body> </html> Actual Results: nothing happens Expected Results: a box with the message bla
Mistake from my side, the example given here was greatly simplified and i made some mistakes in the process of verifying it gave the same bug This code should do though: <html> <head> <title>bla</title> </head> <body> <div id="someDiv"></div> <script type="text/javascript"> document.getElementById("someDiv").innerHTML = "<script type='text/javascript'>alert('bla');<\/script>"; </script> </body> </html>
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.