I utterly detest JavaScript. I don’t like the deception inherent in its name. I don’t like the idea of sending bulky source code around when you could be sending nice compact byte codes, though I must admit the openness has been great since every program acts as a programming tutorial. I don’t like the idea of proprietary Chinese-menu feature set Internet languages. Granted JavaScript is not as disgusting and dangerous as ActiveX since it has its own sort of sandbox — missing language features. I don’t like the way JavaScript is so often used to annoy the heck out of users by making it impossible to leave a site without rebooting. I find the things people tend to do with it are annoyingly cheap and flashy.
JavaScript has been around a long time and more often than not a site with JavaScript will not render properly, and will behave differently with different browsers. To me, using JavaScript is like serving your guests gilded dog feces. It should be stomped out. It is fundamentally flawed and cannot be fixed, any more than a car made of grass clippings could ever run properly. So I have so far avoided it and usually have it turned off in my browsers. The only place I used it on my website are for webring nav bars there I had no choice.
The ECMA (European Computer Manufacturer’s Association) standard version of JavaScript is called ECMAScript. Microsoft has a extension of ECMAScript they call they call Jscript.
Superficially, JavaScript looks a bit like Java crossed with Pascal. Strings may be enclosed in either " or '. Semicolons are separators rather than terminators, as in Pascal. there is an explicit function keyword to make the start of each method. Each declaration is explicitly marked with the keyword var, as in languages designed for each of maintenance.
JavaScript causes havoc in pages when you use them off-line if they try to fetch material from the Internet, blocking page rendering. You can disable JavaScript while off-line with the defer parameter. Unfortunately only Opera and Firefox support in properly both online and off-line. Mozilla, Netscape ignore it. IE (Internet Explorer) screws it up totally. To be fair, the original definition was that the script generated no output, so
<!-- for conventional HTML --> <script type="text/javascript" src="myScript.js" defer></script> <!-- for XHTML --> <script type="text/javascript" src="myScript.js" defer="defer"></script>To my horror, Sun recommends using JavaScript to deploy Java Applets and applications.
| Useful JavaScript Expressions | |||
|---|---|---|---|
| Purpose | Expression | How it Renders | Notes |
| Ensure Java Installed | if( deployJava.versionCheck( '1.7.0' ) ) document.write( 'java 1.7.0+ installed on the desktop' ); | java 1.7.0+ installed on the desktop | Works in all major browsers. Must load deployjava.js first. |
| Browser Detect | document.write( deployJava.getBrowser() ); | Netscape family | Useless except for IE. Must load deployjava.js first. |
| Browser Detect II | document.write( navigator.appname ); | Netscape | Useless except for IE and Opera |
| Ensure Any Java Plugin installed | if ( navigator.javaEnabled() ) document.write( 'Java plug-in installed in browser' ); | Java plug-in installed in browser | Works in all major browsers |
| Ensure Plugin-2 installed | if ( deployJava.isPlugin2() ) document.write( 'Java plug-in-2 installed in browser' ); | Java plug-in-2 installed in browser | Does not work in Opera or Safari |
I wrote this browser detect in frustration with all the existing ones. This is one easy to extend with other browsers.
|
|
You can get the freshest copy of this page from: | or possibly from your local J: drive (Java virtual drive/mindprod.com website mirror) |
| http://mindprod.com/jgloss/javascript.html | J:\mindprod\jgloss\javascript.html | |
![]() | ||
| Canadian Mind Products | ||
| mindprod.com IP:[65.110.21.43] | ||
| view Blog | Your face IP:[38.107.179.214] | |
| Feedback | You are visitor number 16,364. | |