F
Frances Del Rio
pls, why is this not working?
<SCRIPT language=JavaScript type="text/javascript">
var br = '<SCRIPT language=Javascript'
br += 'src="js_pop.js" type="text/javascript">'
br += '</SCRIPT>'
var op = '<SCRIPT language=Javascript'
op += 'src="js_pop-op.js" type="text/javascript">'
op += '</SCRIPT>'
if (navigator.userAgent.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
"undeterminated 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
<SCRIPT language=JavaScript type="text/javascript">
var br = '<SCRIPT language=Javascript'
br += 'src="js_pop.js" type="text/javascript">'
br += '</SCRIPT>'
var op = '<SCRIPT language=Javascript'
op += 'src="js_pop-op.js" type="text/javascript">'
op += '</SCRIPT>'
if (navigator.userAgent.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
"undeterminated 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