PDA

View Full Version : [fixed] Java Script Error in - head_newpm Template



David Bott
Fri 28th Dec '01, 3:19pm
Hi...My mod Dan found another Java Scriot error... This time in head_newpm template....

OK this one is simple, and once again only effect Netscape 4.x users but here goes. Every time a new PM is received the following code is inserted into the page...



<script language="JavaScript">

<!--
function confirm_newpm() {
input_box=confirm("You have a new private message. Click OK to view it, or cancel to hide this prompt.");
if (input_box==true) { // Output when OK is clicked
second_box=confirm("Open in new window?\n\n(Press cancel to open your Inbox in the current window.)");
if (second_box==true) {
window.open('private.php?s=','pmnew','width=600,he ight=500,menubar=yes,scrollbars=yes,toolbar=yes,lo cation=yes,directories=yes,resizable=yes,top=50,le ft=50');
} else {
window.location="private.php?s=";
}
} else {
// Output when Cancel is clicked
}
}
-->

</script>


The problem is the very last line! It needs to be changed from "-->" to "//-->" otherwise Netscape thinks it's code and throws up a syntax error.