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
5
votes
1 answer

Incorrect display( negative margins maybe)?

window.onload = function() { var target1 = document.getElementById("fruit"); var target2 = document.getElementById("veg"); var target3 = document.getElementById("games"); var target4 = document.getElementById("numbers"); var list…
aceuk007
  • 85
  • 7
5
votes
3 answers

Does JScript support string trim method?

Whilst developing a Windows procedure using JScript, it seems that some string methods fail to work. In this example using trim, line 3 generates the runtime error: "Object doesn't support this property or method". My code: strParent = " a …
Andrew Shep
  • 69
  • 1
  • 6
5
votes
2 answers

Fullcalendar shows wrong day in month view

I'm using Fullcalendar within a Asp.Net project and I'm using the function 'events' to refresh items in my calendar. I'm putting events in myArray to pass it in the callback function as below: var event = { title: 'Disponível', …
Gabriel
  • 83
  • 2
  • 9
5
votes
3 answers

JScript: how to run external command and get output?

I'm running my JScript file using cscript.exe. In the script I need to call an external console command and get the output. Tried: var oShell = WScript.CreateObject("WScript.Shell"); var oExec = oShell.Exec('cmd /c dir'); WScript.Echo("Status…
Putnik
  • 5,925
  • 7
  • 38
  • 58
5
votes
4 answers

Documenting the return of a javascript constructor with jsdoc

I have a javascript function that returns a constructor (see code sample below). How would I document this with the @returns tag of jsdoc. It doesnt seem correct to do @returns {MyConstructor} because that implies I am returning an instance of…
computrius
  • 690
  • 7
  • 16
5
votes
1 answer

Is there a "createObject" in javascript?

In VBScript there is a function called CreateObject, which can be run on a client through a webpage. I've used it before like this: Set icaObj = CreateObject("Citrix.ICAClient") CitrixVersion = icaObj.ClientVersion To find out which version of the…
Cyberherbalist
  • 12,061
  • 17
  • 83
  • 121
5
votes
2 answers

What are the functional differences between JScript, JavaScript, and ECMA Script?

Long Question To start, I know ECMA Script is the standard, and JavaScript and JScript are implementations. I understand that all three have their own specifications maintained, and there are many, many engines, interpreters, and implementations,…
Jason Nichols
  • 3,739
  • 3
  • 29
  • 49
5
votes
1 answer

Can a function's return value be an lvalue in JavaScript?

Microsoft allows to set environment variables in JScript with the following syntax: var sh = WScript.CreateObject("Wscript.Shell"); var env = sh.Environment("PROCESS"); env("TEST") = "testvalue"; I wonder about the third line - and with me JSLint,…
rplantiko
  • 2,698
  • 1
  • 22
  • 21
5
votes
1 answer

Microsoft JScript runtime error when using "Use Local IIS Web Server"

Everything was working fine until someone in a Microsoft forum had try a couple devenv switches in command prompt mode: devenv /Resetsettings and Run devenv /ResetSkipPkgs.Prompt for an unrelated problem, namely that I could not save aspx files with…
Sarah Weinberger
  • 15,041
  • 25
  • 83
  • 130
4
votes
3 answers

Javascript Object vs JScript Dictionary

Javascript Objects and JScript Dictionary are both associative Arrays obj = new Object ; dic = new ActiveXObject("Scripting.Dictionary") ; My question is... Is there any difference between them in terms of efficiency (either space or time) ?? In…
GetFree
  • 40,278
  • 18
  • 77
  • 104
4
votes
1 answer

write file using WScript.shell

How can I write text files using WScript I'm really new on this that's why I cannot give some details. I want to write a log file that can be stored in c://users/user/appdata/local my sample code, using FileSystemObject function WriteFile() { …
Robin Carlo Catacutan
  • 13,249
  • 11
  • 52
  • 85
4
votes
2 answers

JScript version availability for WSH installations

I'm not sure if JScript for WSH is available in every windows installation. Which version of JScript is available for WSH, and in which windows version? Please provide the link to an authoritative source.
George Polevoy
  • 7,450
  • 3
  • 36
  • 61
4
votes
1 answer

Meaning of ClipboardFormat values 44 and 50

Excel's Application object has a ClipboardFormats property. From the docs: Returns the formats that are currently on the Clipboard, as an array of numeric values. However, when I run the following code: var app = new…
Zev Spitz
  • 13,950
  • 6
  • 64
  • 136
4
votes
1 answer

Select Value In Table Inside Of Modal And Populate The Form Outside Of The Modal?

This First Image Show The Empty Form and having 3 sample input and having their own name. On This Second Image You Will See The Modal Having Table Inside, Each Of them has different name/data. I want is, if i select 1 row in that table whether i…
4
votes
1 answer

WIA.Vector via Enumerator returns something which is not a number

When accessing the members of the WIA Vector object directly using the Vector's Item property, or using the default property, they are seen by JScript as numbers: var v = new ActiveXObject('WIA.Vector'); v.SetFromString('This is a test', true,…
Zev Spitz
  • 13,950
  • 6
  • 64
  • 136