Diablicolic Posted August 6, 2003 Posted August 6, 2003 So if I pasted JavaScript code into a JScript place, I would get the same product? Quote "Reality is fake, Dreams are for real"
Diablicolic Posted August 6, 2003 Author Posted August 6, 2003 So would I go: <script language="JavaScript"> Or <script language ="JScript"> And would <script language ="JScript"> only work with people that the .NET Framework on a website? Quote "Reality is fake, Dreams are for real"
*Experts* Volte Posted August 6, 2003 *Experts* Posted August 6, 2003 Well, what I said about Javascript and JScript being the same may not be exactly true... it may vary from browser to browser -- Javascript is the Netscape implementation, and JScript is Microsoft's, though I think in IE it doesn't make a difference. It might in other browsers. The two are very similar regardless. I'm also not familiar with the way JScript.NET works, myself. I've just done a bit of reading on it, but it doesn't seem to say when JScript.NET is used. It looks like language="JScript" simply forces the browser to use the version of JScript installed, be it 5.5 or .NET. Quote
Leaders dynamic_sysop Posted August 6, 2003 Leaders Posted August 6, 2003 you can use " javascript " in internet explorer and " netscape " , but JScript doesnt work on netscape as Voltface said. for example .... // csharp seems the easiest code block to show java in. // check if the browser being used is netscape or ie. // works on both. <script language ="javascript"> if(document.all) { window.alert("you are using internet explorer!"); } else if(document.layers) { window.alert("you are using Netscape!"); } </script> but if you change the "javascript" to "JScript" , it works in ie , but not in netscape. Quote
Diablicolic Posted August 6, 2003 Author Posted August 6, 2003 Then why would they have JScript? Especially if you're hosting a commercial website? Quote "Reality is fake, Dreams are for real"
*Experts* mutant Posted August 6, 2003 *Experts* Posted August 6, 2003 (edited) Most people say that Microsoft made JScript just becuase they wanted their own scripting language, not JavaScript which was first developed by Netscape :). JScript is fully compliant with the scripting standards except minor exceptions for backward compatibility. So there is not much difference between the two, except some incombaptibilities with non-MS browsers. Edited August 6, 2003 by mutant Quote
Leaders dynamic_sysop Posted August 6, 2003 Leaders Posted August 6, 2003 what gets me is , this article on msdn basically states that VBScript is in-compatible with netscape , but JScript is... link to full article >JScript compatibilaty Client If you are planning to script HTML on the Internet and would like the "broad reach" of supporting both Netscape and Microsoft browsers, then your choice of languages is limited to JScript. Netscape does not support VBScript, so if you want to ensure that your page is viewable with modern browsers, you need to use JScript. Using JScript, however, does not guarantee that your script will work on all browsers, since there are many differences in HTML object-model conformance among the leading browsers. If you stick to features in HTML 3.2 (see the World Wide Web Consortium, or W3C, specification and ECMAScript (see the ECMA Standard, you should be okay. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.