Closed Bug 36138 Opened 25 years ago Closed 25 years ago

Creating SCRIPT tag dynamically

Categories

(Core :: DOM: HTML Parser, defect, P3)

x86
Windows NT
defect

Tracking

()

VERIFIED INVALID

People

(Reporter: sathish, Assigned: rickg)

Details

When i write Javascript to add the SCRIPT tag dinamically based some conditions, Netscape always returns errors. For example if i say if (SOMETHING) document.write("<SCRIPT SRC=SOMETHING.JS></SCRIPT>"); else document.write("<SCRIPT SRC=EVERYTHING.JS></SCRIPT>"); Netscape gives lot of syntax errors. How can i achieve this?
You have to escape the slash for the </SCRIPT> tag like so: <\/SCRIPT>. There are several other bugs on this, most marked INVALID or WONTFIX. Contents of a SCRIPT tag is cdata which is ended by the next occurrence of </SCRIPT>, whether or not it occurs in quotes.
Assignee: rogerl → rickg
Component: Javascript Engine → Parser
QA Contact: pschwartau → janc
Marking INVALID. Gerv
Status: UNCONFIRMED → RESOLVED
Closed: 25 years ago
Resolution: --- → INVALID
verified
Status: RESOLVED → VERIFIED
Summary: Creating SCRIPT tag dinamically → Creating SCRIPT tag dynamically
You need to log in before you can comment on or make changes to this bug.