T
Tom de Neef
I have a second window for pop-ups.
It is used to display text generated by the calling code, rather than a
referenced html document.
To execute links in that text, some script code needs to be added to the
text. But I cannot get the script included.
function PopUp(txt)
{
var head = '<head>'+
'<script type="text/javascript"
src="wwRegels.js"></script>'+
'</head>'
secondWindow.document.write('<html>'+head+'<body>'+txt+'</body></html>')
secondWindow.document.close()
if (window.focus) { secondWindow.focus() }
}
Browsers (IE, FF) object to the line starting with '<script (unterminated
string literal) when loading the page. If I change "script" into "scrapt",
loading completes without rrors. The browser seems to refuse "<script" as
part of my string or I am blind to some mistake I've made. I have tried
backslashes here and there but to no avail. Is there a way around ?
TIA
Tom
It is used to display text generated by the calling code, rather than a
referenced html document.
To execute links in that text, some script code needs to be added to the
text. But I cannot get the script included.
function PopUp(txt)
{
var head = '<head>'+
'<script type="text/javascript"
src="wwRegels.js"></script>'+
'</head>'
secondWindow.document.write('<html>'+head+'<body>'+txt+'</body></html>')
secondWindow.document.close()
if (window.focus) { secondWindow.focus() }
}
Browsers (IE, FF) object to the line starting with '<script (unterminated
string literal) when loading the page. If I change "script" into "scrapt",
loading completes without rrors. The browser seems to refuse "<script" as
part of my string or I am blind to some mistake I've made. I have tried
backslashes here and there but to no avail. Is there a way around ?
TIA
Tom