javascript puzzle

For topics about current BETA or future releases, including feature requests.
Post Reply
User avatar
roedygr
Rank V - Professional
Rank V - Professional
Posts: 370
Joined: Fri Feb 17, 2006 5:22 am
Location: Victoria BC Canada
Contact:

javascript puzzle

Post by roedygr » Wed Apr 30, 2008 7:52 am

The beta complains about his code, saying it is missing a semicolon. I can't see what the trouble is.

<script language="javascript" type="text/javascript">
<!--
var jwsinstalled = 0;
var tryIE = "false";
if ( navigator.mimeTypes && navigator.mimeTypes.length && navigator.mimeTypes[ 'application/x-java-jnlp-file' ] ) jwsinstalled = 1;
else tryIE = "true";
// -->
</script>
<script language="vbscript" type="text/vbscript">
<!--
on error resume next
if tryIE = "true" Then
if IsObject(CreateObject( "JavaWebStart.isInstalled" )) Then
jwsinstalled = 1
end If
end If
// -->
</script>
<script language="javascript" type="text/javascript">
<!--
if ( jwsinstalled )
document.write( "Your browser appears to be already configured properly for Java Web Start." );
else document.write( '<span class="important">Your browser is <i>not</i> configured properly for Java Web Start *.jnlp and application/x-java-jnlp-file MIME types! Click to learn how to <a class="button" href="installingjaws.html">Repair</a> the damage.</span>' );
// -->
</script>

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3445
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Post by Albert Wiersch » Wed Apr 30, 2008 9:50 am

Thanks. I will pass this along to the develop of the JavaScript linter. I think it may be an issue with it trying to check VBScript.

Here is the linter that CSE HTML Validator v9.0 integrates with for linting JavaScript:
http://javascriptlint.com/index.htm
Image
Albert Wiersch

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3445
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Post by Albert Wiersch » Wed Apr 30, 2008 12:54 pm

I received a response about this:
Matthias Miller wrote:Ideally, JavaScript Lint would ignore VBScript. However, it's nontrivial to fix, although I would accept patches for it. I've been doing some work to make JavaScript Lint more extensible in the future, but since this is only a side project, it doesn't get full-time attention.

If I think of any good solutions, I'll let you know.
Image
Albert Wiersch

User avatar
roedygr
Rank V - Professional
Rank V - Professional
Posts: 370
Joined: Fri Feb 17, 2006 5:22 am
Location: Victoria BC Canada
Contact:

Post by roedygr » Wed Apr 30, 2008 3:33 pm

Matthias Miller wrote:Ideally, JavaScript Lint would ignore VBScript. However, it's nontrivial to fix,
I find that odd. You have the enclosing tag
<script language="vbscript" type="text/vbscript">
to tell you vbscript not javascript is coming up.
It is not as though you have to tell vbscript apart from javascript just by looking at the code.

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3445
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Post by Albert Wiersch » Wed Apr 30, 2008 3:48 pm

roedygr wrote:
Matthias Miller wrote:Ideally, JavaScript Lint would ignore VBScript. However, it's nontrivial to fix,
I find that odd. You have the enclosing tag
<script language="vbscript" type="text/vbscript">
to tell you vbscript not javascript is coming up.
It is not as though you have to tell vbscript apart from javascript just by looking at the code.
I find it a little odd too but I don't know the design details of JavaScript Lint. You can turn JavaScript linting off in the Validator Engine Options if you are not interested in it or if it is generating too many false messages because it's trying to check VBScript.
Image
Albert Wiersch

Post Reply