Click to See Complete Forum and Search --> : JScript != JavaScript
Mark Sreeves
Feb 22nd, 2001, 04:25 AM
OK,
JScript is NOT the same as JavaScript
JScript is Microsoft's version of Javascript
but does anyone know what the difference is?
I had I look at this page:
http://msdn.microsoft.com/scripting/
and found this in the JScript FAQ:
How do JScript and JavaScript compare?
JScript fully complies with ECMAScript. While JavaScript 1.1
and JScript 2.0 served as the basis for ECMA standards work,
the standards process has resulted in significant language
improvements in the areas of Unicode support, IEEE math
functions and improved date functions.
Well, that's cleared up that mis-understanding hasn't it??!!! :confused::confused:
:confused:
JoshT
Feb 22nd, 2001, 10:06 AM
In MSDN, there is listing of features of JScript not in ECMAScript, here's a quick cut and paste:
Array Handling VBArray
dimensions, getItem, lbound, toArray, ubound
Conditional Compilation @cc_on
@if Statement
@set Statement
Conditional Compilation Variables
Dates and Time getVarDate
Enumeration Enumerator
atEnd, item, moveFirst, moveNext
Objects Enumerator
Regular Expression
VBArray
ActiveXObject
GetObject
Script Engine Identification ScriptEngine
ScriptEngineBuildVersion
ScriptEngineMajorVersion
ScriptEngineMinorVersion
I've also noticed that Ms's documentation says that "Jscript" works in Netscape...
Josh
Frankie902
Feb 22nd, 2001, 07:55 PM
Probobly why Quickbasic is different then QBasic. Both from the same company. QBasic is the one that doesnt complile and QuickBasic is the one that does.
sail3005
Feb 22nd, 2001, 08:30 PM
Javascript it from netscape and JScript is from MS, they are not from the same company.
Frankie902
Feb 22nd, 2001, 09:11 PM
I know that, I said QBasic and Quickbasic were, not JScript and Java Script.
sail3005
Feb 22nd, 2001, 09:15 PM
ok, i misunderstood
CiberTHuG
Feb 23rd, 2001, 08:01 AM
As you know Sun started the Java project. Their goal is to create a virtual machine to run on every OS/hardware configuration under the sun. This will allow you to write once, run everywhere (just not yet).
And yes, I'm sure someone somewhere appreciates the pun.
MS has a nack for specializing anything to run better on their Wintel platform. Since they refused to stick to the standard, they were kicked off the project. MS is not allowed to call itself Java compliant. It does support Java, but in a MS-centric way.
Javascript is the standard for ECMAScript. JScript is MS's answer to Javascript. And though it does support all of the ECMAScript standards (which is why it should run under Navigator/Opera/et al) it has additional features, which are not part of the standard. As a result, there are some tricks you can do with JScript that only another Wintel would be able to appreciate.
JScript is not Javascript. MS is not Java compliant. JScript underminds the standard by introducing features not to promote the standard, but to make it a more enjoyable experience for a certain section of the market.
Anyway... this is as I understand it. I could have missed a detail or dozen somewhere since it makes me mad just to read a trade mag.
Did I mention I'm bored this morning?
pnj
Feb 23rd, 2001, 01:33 PM
the jscript engine(from MS) will parse javascript and jscript(in a browser) but you can also write code in just jscript that will not function in Netscape.
you will never get a jscript error in Netscape but you will in IE(if there is actually an error)
we recently had a problem where the jscript engine died in one of our test browsers and what would normaly work stoped functioning and gave us a jscript error. but the script was javascript.
after some research I found the info mentioned above.
this is my opionon based on my research.unfortinatly (i can't spell) I can't find the page that I got that info on
Lord Orwell
Feb 27th, 2001, 01:21 AM
heh. Type any command in the address bar that contains jscript, and ie changes it to vbscript.
example: jscript:alert('hi'); I take this as proof that jscript is just another name for vbscript.
if you think that this is impossible, try this from your run box:
javascript:alert('hi');
I believe you can see how this could be a security problem. Just try running this from the run box to see what i mean. javascript:history.go(0);
it will open up a locked up browser.
Mark Sreeves
Feb 27th, 2001, 04:24 AM
Thanks for the replies and research.
It seems odd to me that even the JScript examples on the MSDN site say:
<Script Language=JavaScript>
sail3005
Feb 28th, 2001, 11:36 AM
well, most browsers support javascript, and i can only think of one that supports jscript, so they probably put javascript to make it more compatible.
rchiav
Mar 7th, 2001, 06:39 PM
MS didn't add what it calls "extensions" because they were trying to make a better product. They added "extensions" to try to cornet the market. Their thinking is that they can squash any compitition by taking what it thrives on and changing it so the vast majority of the people don't have something that works if they use something other than an MS product. Hence the extensions.
They actually thought about making TCP/IP extensions to try to run Linux out of the market, but then the "Haloween Papers" hit the market. Those were some internal MS memos on the research they did into the compitition that Linux would generate. From reading the papers, they are a little fearful of how rapidly Open Source projects develop. They then went on to mention how the heart of Linux was TCP/IP and they they could "better compete" if they make Microsoft TCP/IP extensions.
Anyway.. Just thought I'd add some usless information :D
sail3005
Mar 7th, 2001, 06:59 PM
Down with MS!
chrismitchell
Mar 14th, 2001, 02:28 AM
I don't think that there is a difference! I just think that M$ stole the idea because someone else was making money from it!
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.