External vbscript

For topics about current or future BETA releases, including feature requests.

External vbscript

Postby RSteinwand » Wed Feb 24, 2010 8:23 pm

I have this script that flags a warning, yet validates with W3C:

<script type="text/vbscript" src="/scripts/makemsgbox.vbs"></script>

"The "type" attribute specifies an unrecognized scripting language "text/vbscript". Make sure the value is correct. NOTE: The value should be a case-insensitive match for a valid MIME type of a scripting language."

http://www.w3.org/TR/2002/WD-xhtml2-20020805/mod-scripting.html#sec_18.2.2.
Rick
User avatar
RSteinwand
Rank IV - Intermediate
Rank IV - Intermediate
 
Posts: 161
Joined: Mon Jun 09, 2008 2:12 pm
Location: Fargo, ND

Re: External vbscript

Postby Albert Wiersch » Thu Feb 25, 2010 10:13 am

Thanks! I'm surprised no one has mentioned that before. It will be fixed in the next BETA.

The W3C validator will accept just about anything for the value of the "type" attribute (as well as many other attributes since it is very limited on what it can check for)... for example, try type="jibberish" and it will still pass it.
User avatar
Albert Wiersch
Site Admin
Site Admin
 
Posts: 2361
Joined: Sat Dec 11, 2004 10:23 am
Location: Near Dallas, TX

Re: External vbscript

Postby RSteinwand » Thu Feb 25, 2010 11:26 am

I'm guessing not many people use vbscript, I only have one.
Rick
User avatar
RSteinwand
Rank IV - Intermediate
Rank IV - Intermediate
 
Posts: 161
Joined: Mon Jun 09, 2008 2:12 pm
Location: Fargo, ND

Re: External vbscript

Postby Albert Wiersch » Thu Feb 25, 2010 12:14 pm

RSteinwand wrote:I'm guessing not many people use vbscript, I only have one.


Yes, I think you are right! Are there any other browsers that support it besides IE? I'm not aware of any.
User avatar
Albert Wiersch
Site Admin
Site Admin
 
Posts: 2361
Joined: Sat Dec 11, 2004 10:23 am
Location: Near Dallas, TX

Re: External vbscript

Postby RSteinwand » Thu Feb 25, 2010 12:26 pm

The script I use works in all browsers and just uses an alert message to present an alert with yes/no buttons.

I suspect jQuery might have something better.

EDIT: Just checked the script and it was only called from IE, O/W used the standard alert box.

Going to migrate to this instead: http://abeautifulsite.net/2008/12/jquer ... /#overview
Rick
User avatar
RSteinwand
Rank IV - Intermediate
Rank IV - Intermediate
 
Posts: 161
Joined: Mon Jun 09, 2008 2:12 pm
Location: Fargo, ND

VBScript Handling

Postby roedygr » Thu Feb 25, 2010 7:18 pm

I wish VBScript would crawl into a grave and die, but even I have little bits of it on my web pages.

As it is, HTMLValidator pretends it has never ever heard of VBScript:
<script language="vbscript" type="text/vbscript">

The "type" attribute specifies an unrecognized scripting language "text/vbscript". Make sure the value is correct. NOTE: The value should be a case-insensitive match for a valid MIME type of a scripting language.

This is going a bit far. It should simply ignore it or warn it refuses to validate it on the grounds it is proprietary and not much used.

I wrote earlier about HTMLValidator getting confused between VBScript and JavaScript. I had to turn off JavaScript validation. I would hope this should not be necessary.
User avatar
roedygr
Rank V - Professional
Rank V - Professional
 
Posts: 242
Joined: Fri Feb 17, 2006 6:22 am
Location: Victoria BC Canada

Re: VBScript Handling

Postby Albert Wiersch » Fri Feb 26, 2010 9:44 am

roedygr wrote:The "type" attribute specifies an unrecognized scripting language "text/vbscript". Make sure the value is correct. NOTE: The value should be a case-insensitive match for a valid MIME type of a scripting language.

This is going a bit far. It should simply ignore it or warn it refuses to validate it on the grounds it is proprietary and not much used.


Yes, this has been fixed, but I think your idea about displaying a warning about vbscript is a good idea. I will add that.

UPDATE: A warning is now displayed for "text/vbscript":
[1] VBScript is mainly supported by Internet Explorer. Other browsers like Firefox, Opera, and Safari do not have built-in support for VBScript and are unlikely to support it. Consider using JavaScript for cross-browser compatibility. This message is displayed only once.

roedygr wrote:I wrote earlier about HTMLValidator getting confused between VBScript and JavaScript. I had to turn off JavaScript validation. I would hope this should not be necessary.


I believe this was a limitation of JavaScript Lint which CSE HTML Validator uses. I have been trying to contact the author of JavaScript Lint and find out if a suitable update is available to include with CSE HTML Validator v10 but I have been unsuccessful so far.
User avatar
Albert Wiersch
Site Admin
Site Admin
 
Posts: 2361
Joined: Sat Dec 11, 2004 10:23 am
Location: Near Dallas, TX

Re: External vbscript

Postby RSteinwand » Fri Feb 26, 2010 9:49 am

VbScript probably should have a warning about only working in IE.
Rick
User avatar
RSteinwand
Rank IV - Intermediate
Rank IV - Intermediate
 
Posts: 161
Joined: Mon Jun 09, 2008 2:12 pm
Location: Fargo, ND


Return to CSE BETA Talk

Who is online

Users browsing this forum: No registered users and 1 guest