Copy link to clipboard
Copied
Dreamweaver is telling me there's a syntax error, and yet I see no errors around the line.
This is the part of the page
<script type="text/javascript">
function logout(){
document.forms["logoutform"].submit();
}
function openMail(){
window.open("/mail.php","mailer","menubar=no,toolbar=no,height=360,width=485");
}
//Preload
function preload() {
for (i = 0; i < preload.arguments.length; i++) {
images = new Image()
images.src = preload.arguments
}
}
preload("/tabHover.png");
</script>
-->DREAMWEAVER SHOWS ERROR IS ON THIS BLANK LINE<--
<style type="text/css">
Why does it say there is a error there? If I take the > off of </script> it says there's no error.
Copy link to clipboard
Copied
You are missing line terminators in your for loop.
Copy link to clipboard
Copied
Ah, good find, however I fixed that and it still says syntax error.
Copy link to clipboard
Copied
I fixed one other error (images was not defined) and it runs fine in the browser, but dreamweaver still says there's a syntax error.
Copy link to clipboard
Copied
Even if I comment everything out inside the script block it still says there's a syntax error.
Copy link to clipboard
Copied
Sometimes the syntax checker gets a little tired.
Usually, the error message goes away if you save the file, close it, and reopen it.
Copy link to clipboard
Copied
Hm... I tried closing and opening it, and even closing and opening dreamweaver, and I still get the error message. I'm sure I'm doing something dumb... does having a HTML5 document make a difference?
<script type="text/javascript">
function logout(){
document.forms["logoutform"].submit();
}
function openMail(){
window.open("/mail.php","mailer","menubar=no,toolbar=no,height=360,width=485");
}
//Preload
var images = new Array();
function preload() {
for (i = 0; i < preload.arguments.length; i++) {
images = new Image();
images.src = preload.arguments;
}
}
preload("/tabHover.png");
</script>
-->THIS IS THE LINE IT MARKS THE ERROR ON<--
<style type="text/css">