vag118
asked on
JS tag on the fly
I'm trying to make an html page on the fly with a JS tag included in the head of the document created but Netscpe won't include it but IE will. When I view the source of the created page, Netscape won't show this tag
<SCRIPT SRC="testing.js" LANGUAGE="javascript"></SC RIPT>
in the head. If I can get Netscape to show the above tag, then I can solve my problem at http://www.geocities.com/Yosemite/3999/xtra.html which is what I'm trying to accomplish without errors.
Here's the srcipt
<HTML>
<HEAD>
<TITLE>The Team of NZ</TITLE>
<script language="javascript">
<!--
function makeWindow(who,desc) {
var newWindow =window.open("","","width= 320,height =150")
if (newWindow != null) {
// assemble content for new window
var newContent = "<HTML>" + "\n"
newContent += "<HEAD>" + "\n"
newContent += "<TITLE>" + who + "\'s Window</TITLE>" + "\n"
newContent += "<SCRIPT SRC=\"testing.js\" LANGUAGE=\"javascript\"></ SCRIPT>" + "\n"
newContent += "</HEAD>" + "\n"
newContent += "<BODY BGCOLOR=\"green\" TEXT=\"gold\">" + "\n"
newContent += "<CENTER>" + "\n"
newContent += "<h1>" + who + "</h1>" + "\n"
newContent += desc + "\n"
newContent += "</center>" + "\n"
newContent += "</body></html>" + "\n"
// write HTML to new window document
newWindow.document.write(n ewContent)
newWindow.document.close() // close layout stream
}
}
// end script -->
</SCRIPT>
</head>
<BODY BGCOLOR="black" TEXT="cyan" LINK=cyan VLINK=red>
<CENTER>
<a HREF="javascript:makeWindo w('Tom & Jacqui', 'Tom(graphics XTRAordinaie) a bit serious on his work.')">test</a>
<P>
<a HREF="javascript:makeWindo w('Melissa ', 'Graphics whiz Melissa, determined to get it right')">test1</a>
<P>
<a HREF="javascript:makeWindo w('Vict the Man', 'That\'s me working very hard on those very tricky HTML')">test2</a>
<P>
<a HREF="javascript:makeWindo w('Rennie' , 'The very friendly receptionist who loves her work')">test3</a>
<P>
<a HREF="javascript:makeWindo w('Tom', 'Who threw that?')">test4</a>
</center>
</body>
</html>
<SCRIPT SRC="testing.js" LANGUAGE="javascript"></SC
in the head. If I can get Netscape to show the above tag, then I can solve my problem at http://www.geocities.com/Yosemite/3999/xtra.html which is what I'm trying to accomplish without errors.
Here's the srcipt
<HTML>
<HEAD>
<TITLE>The Team of NZ</TITLE>
<script language="javascript">
<!--
function makeWindow(who,desc) {
var newWindow =window.open("","","width=
if (newWindow != null) {
// assemble content for new window
var newContent = "<HTML>" + "\n"
newContent += "<HEAD>" + "\n"
newContent += "<TITLE>" + who + "\'s Window</TITLE>" + "\n"
newContent += "<SCRIPT SRC=\"testing.js\" LANGUAGE=\"javascript\"></
newContent += "</HEAD>" + "\n"
newContent += "<BODY BGCOLOR=\"green\" TEXT=\"gold\">" + "\n"
newContent += "<CENTER>" + "\n"
newContent += "<h1>" + who + "</h1>" + "\n"
newContent += desc + "\n"
newContent += "</center>" + "\n"
newContent += "</body></html>" + "\n"
// write HTML to new window document
newWindow.document.write(n
newWindow.document.close()
}
}
// end script -->
</SCRIPT>
</head>
<BODY BGCOLOR="black" TEXT="cyan" LINK=cyan VLINK=red>
<CENTER>
<a HREF="javascript:makeWindo
<P>
<a HREF="javascript:makeWindo
<P>
<a HREF="javascript:makeWindo
<P>
<a HREF="javascript:makeWindo
<P>
<a HREF="javascript:makeWindo
</center>
</body>
</html>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.