Questions tagged [jscript]

JScript is a scripting language based on the ECMAScript standard, created by Microsoft and implemented in a range of environments. You would expect this tag to accompany questions regarding these environments, such as Windows Script Host (WSH), Active Server Pages (ASP) and HTML Applications (HTA).

JScript is a scripting language based on the standard, created by Microsoft and implemented in a range of environments, including:

JScript is not to be confused with JavaScript () — although they are both implementations of the ECMAScript language — because, often, people refer to JScript when discussing client or server scripting outside of a web page. As such, you would expect the tag to accompany , or questions. was named after JScript, but it is not the same.

JScript supports several unique features such as conditional compilation, COM object instantiation and a method to force garbage collection.

Official Documentation

1180 questions
125
votes
13 answers

What's the difference between JavaScript and JScript?

I have always wondered WHaT tHE HecK?!? is the difference between JScript and JavaScript.
Brian G
  • 53,704
  • 58
  • 125
  • 140
60
votes
6 answers

How to replace comma with a dot in the number (or any replacement)

I could not found a solution yet, for replacing , with a dot. var tt="88,9827"; tt.replace(/,/g, '.') alert(tt) //88,9827 i'm trying to replace a comma a dot thanks in advance
Leo
  • 1,787
  • 5
  • 21
  • 43
48
votes
6 answers

How can I compress (/ zip ) and uncompress (/ unzip ) files and folders with batch file without using any external tools?

I know the similar questions were asked here a lot, but I'm not completely satisfied with the answers (and even with the questions). The main goal is compatibility - it should be applicable to widest possible range of Windows machines (including XP,…
npocmaka
  • 55,367
  • 18
  • 148
  • 187
32
votes
6 answers

What's the difference between JavaScript, JScript & ECMAScript?

OK, so I'm trying to learn JavaScript properly so that I can write good, clean client-side code, but whenever I think I'm making progress, something stops me dead in my tracks! I want to know: What is the different between JavaScript, ECMAScript…
Matthew Layton
  • 39,871
  • 52
  • 185
  • 313
27
votes
2 answers

How can I download a file with batch file without using any external tools?

First to clarify this question is aimed to HTTP(s) download .For FTP may be I'll ask (and answer) another question. Here are some similar questions - but I want to be more precise . Besides excluding external tools I want the solution(s) to be…
npocmaka
  • 55,367
  • 18
  • 148
  • 187
21
votes
2 answers

list of exceptions

I am looking for a list of possible exceptions in c#, c++, vb.net, j# and jscript. The problem is that some sites show me a list of 20 exceptions whereas some other site shows me a list of 39 exceptions. Can anyone please give me a proper…
Pavani gaddam
  • 287
  • 1
  • 2
  • 7
18
votes
8 answers

Windows Script Host Error: Invalid character - Code:800A03F6 - Source: Microsoft JScript compilation error

I'm having an issue with Powershell and CMD. When I try to execute Angular CLI commands in CMD like ng --version or ng new projectName, I get this error; Windows Script Host Error: Invalid character Code: 800A03F6 Source: Microsoft JScript…
15
votes
3 answers

What is the Javascript method CollectGarbage()? When and why should it be used?

I notice in the VS2010 javascript intellisence there is a method called CollectGarbage(). Is this an IE only method? When should it be used? What are the advantages (or disadvantages) to using it?
Kenneth J
  • 4,846
  • 11
  • 39
  • 56
14
votes
2 answers

Prompt dialog in WSH using JScript?

How to open a prompt dialog box in WSH usig JScript?? The only pop-up dialog I've found in the doc is the WshShell.Popup() method. But I need a way to request the user to enter a string, like the window.prompt() method in DOM. Thanks.
GetFree
  • 40,278
  • 18
  • 77
  • 104
14
votes
2 answers

How can I write a simple JScript input/output program?

I'm planning on using JavaScript to enter an informatics competition (BIO) tomorrow. However, I can't rely on the examiner having a browser with a decent JavaScript engine, so I was hoping to use Microsoft's JScript instead. However, the…
Eric
  • 95,302
  • 53
  • 242
  • 374
13
votes
1 answer

Is using var foo = function foo() {}; expression creating a memory leak in IE < 9?

I know that this form: var foo = function bar() {}; will leak the bar name to the enclosing scope and create two functions in jscript. How about: var foo = function foo() {}; ? It still leaks the name to enclosing scope, but it's in there anyway…
soulcheck
  • 36,297
  • 6
  • 91
  • 90
12
votes
1 answer

passing arguments to javascript through cscript on the command line

I have a small command line JScript routine that I usually run from the command line using cscript in Windows. I'd like to be able to pass in arguments hopefully along the lines of... %:>cscript doSomethingToFile.js FileInQuestion.txt Any insight…
chuck taylor
  • 2,476
  • 5
  • 29
  • 46
11
votes
3 answers

cscript jscript JSON

This is a very very (very!!!) strange problem. I have this JSCRIPT that runs on windows XP and 7 using dos CSCRIPT in a file called testJSON.js. if ( ! this.JSON ) WScript.Echo("JSON DOESN'T EXISTS"); And, well, the message appear, but is an…
Andrea Rastelli
  • 617
  • 2
  • 11
  • 26
11
votes
2 answers

Weird bug on Videojs

I don't know how this happens and I can't see any errors. I can't seem to navigate through the video the second time I open my page. See screenshot here: I have found this error it says, TypeError: Floating-point value is not finite. "Video is not…
Shiro
  • 273
  • 4
  • 17
10
votes
2 answers

How do I add coordinates to an SVG polyline?

How do I add coordinates to an existing SVG polyline with JavaScript?
TK421
  • 801
  • 5
  • 16
  • 24
1
2 3
78 79