Unterminated string constant (javascript&asp)
Hello,
Hopefully somebody could help me with this problem that has really started to piss me off...
I have a code combined with vbscript and javascript and have a weird "Unterminated string constant" error. Its weird because it doesn't occur on every server where its running.
Here's part of the code:
if (parent.islocked == '1') {
alert('<%=GetLocale("invoices.asp","lockedinvoice" )%>: ' + parent.lockedby);
parent.islocked=0;
parent.lockedby='';
history.back();
}
The point of it is that all the header texts are in array (the text depends on the language user has defined so it can't be hard coded) and they are picked from there with GetLocale function and the javascript pops up a message box if necessary. The weird part is that most of the time the source code from IE looks like this:
if (parent.islocked == '1') {
alert('Invoice has been locked: ' + parent.lockedby);
parent.islocked=0;
parent.lockedby='';
history.back();
}
And sometimes like this with "Unterminated string constant" error:
if (parent.islocked == '1') {
alert(Invoice has been locked
: ' + parent.lockedby);
parent.islocked=0;
parent.lockedby='';
history.back();
}
I would appreciate a lot if somebody could give a good explanation for this.
Beatmasta
|