pls, why is this not working?
<SCRIPT language=JavaSc ript type="text/javascript">
var br = '<SCRIPT language=Javasc ript'
br += 'src="js_pop.js " type="text/javascript">'
br += '</SCRIPT>'
var op = '<SCRIPT language=Javasc ript'
op += 'src="js_pop-op.js" type="text/javascript">'
op += '</SCRIPT>'
if (navigator.user Agent.indexOf(' Opera') != -1 ) {
document.write( op)
} else {
document.write( br)
}
//-->
</SCRIPT>
I pulled a script with an identical construction from the JS Bible:
function reWrite() {
var newContent = “<HTML><HEAD> <TITLE>A New Doc</TITLE></HEAD>â€
newContent += “<BODY BGCOLOR=’aqua ’><H1>This document is brand new.</H1>â€
newContent += “Click the Back button to see original document.â€
newContent += “</BODY></HTML>â€
document.write( newContent)
}
what's wrong with my construction?? error msg I get in IE says
"undetermin ated string constant".. and the other weird thing is that part
of the script appears at the very top of the page, this is what appears:
" var op = "
(http://www.francesdelrio.com/hbl/index2.html)
thank your for any help....
Frances
Comment