Page 1 of 1

final ; in javascript required?

Posted: Wed Sep 28, 2011 10:28 pm
by flashbrack
I am new to the CSE HTML validator (very impressed with it), also an amateur web designer. So excuse me if this is a naive question.

I have a javascript function as below on my frameset index.htm page. (Yes I know frames are now deprecated and will eventually switch to iframes).

<script type="text/javascript">
var fname="main"; //MAIN CONTENT AREA FRAME **NAME**

Which I found on the web to handle redirection to a requested page after reloading the frameset, when the page has been addressed directly.

My question regards the final ";" after the function's closing "}", which I added to satisfy the javascript lint component of CSE validator pro. It seems non-standard, why is it required? The script works fine with it or without it. I have been unable to find a reference to this syntax on the W3C site.

Not a big deal, just curious.

Re: final ; in javascript required?

Posted: Thu Sep 29, 2011 8:37 am
by Albert Wiersch

I tried to reproduce this but couldn't get JavaScript Lint to produce any messages at all, other than the "[JavaScript Lint] 0 error(s), 0 warning(s)" one. Can you supply a full document that reproduces the problem? Have you changed any JavaScript Lint options from the default?

Thank you.