jscript

performance test of DOM operations via innerHTML

According to spirit of stackoverflow (thanks to @Bill the Lizard clarifying this) I would like to introduce small own research of the well known to all front-end web developers question. How to get better performance of jscript while programming DHTML, using innerHTML or DOM operations? For the testing I have created single HTML page ...

Esoteric JScript hosting problem: where is the error code when IDispatch::Invoke returns SCRIPT_E_PROPAGATE?

Our application hosts the Windows Scripting Host JScript engine and exposes several domain objects that can be called from script code. One of the domain objects is a COM component that implements IDispatch (actually, IDispatchEx) and which has a method that takes a script-function as a call-back parameter (an IDispatch* as a parameter)...

Many names of JavaScript / ECMA

I was looking up newer functions of JavaScript and found ECMAScript/ECMA 5. Because I had never heard of it I looked in to it more and found that it comes in the form of different names such as: JavaScript, JScript (Microsofts Variation), ECMAScript, ECMA 5, E4X (JavaScript for Xml)and many others From what I have read it seems that ...

How to judge if a URL is already encoded with encodeURI?

I'm trying to do it in VBScript/JScript, to avoid re-encoding. Should I judge if there is "%" ? Does "%" have other uses in URL? Thanks. Edit: Oh, the original encoding function may not be encodeURI. I'm trying to collect URLs from the browser, and store them after encoding with encodeURI. But if the URL is already encoded, another enco...

Converting JScript to VB.NET - Questions

I'm trying to convert some functions written in JScript to VB.NET (I'm porting a classic ASP page to ASP.NET) and having issues as I'm not very familiar with JScript. I'm having issues with converting even the function declaration properly in VB.NET. In my converted code VS2008 is giving me an error saying "Array bounds can not be specif...

COM Object is null when using JScript

Hi, I create a .net COM object (C#), register it using regasm \codebase. The object work as expected in various languages (powershell, C# etc'), but fail when i' trying to use JScript. The object is null, i don't know what else can i do (i'm using newActivx(...)). Maybe the registration was not good? if so - why it works in powershell? ...

standard ActiveXObject refrence list

Is there a reference for the standard available ActiveXObject objects? so far I know of: Excel.Application Excel.Sheet Scripting.FileSystemObject ...

Error calling C# COM Object function from JScript

Hi, I have C# com object and i'm trying to call function from jscript. This function get parameters (other com object) and use another dll to do something. The object created but when i'm calling the function i'm getting this error: Could not load file or assembly 'MyDLL, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of i...

converting request.querystring using toString()

In JScript, why do I get the error "Object doesn't support this property or method" when I try to convert request.querystring to a string using toString()? var params = Request.QueryString; var params = params.toString(); Background info: I'm trying to convert the querystring to a string so that I can perform a regex replace and rem...

Google chart formatting

I have the following script which I need to modify a little. Here is the json: [ {"User1":{"v": 50.00,"f": "£100"}}, {"User2":{"v": 10.00,"f": "£20"}}, {"User3":{"v": 10.00,"f": "£20"}}, {"User4":{"v": 10.00,"f": "£20"}}, {"User5":{"v": 20.00,"f": "£40"}} ] and here is the script: <html> <head> <script language="...

Need help with Asp.net and AJax Control Toolkit

I am currently making a website that uses the Ajax Control Toolkit and when I try to log in to the website I get this error: Microsoft JScript runtime error: AjaxControlToolkit requires ASP.NET Ajax 4.0 scripts. Ensure the correct version of the scripts are referenced. If you are using an ASP.NET ScriptManager, switch to the ToolkitScri...

Permission issues when running JScript from C# Console application.

I'm trying to run a Jscript task from a C# console application. The Jscipt file is not mine so I can't change it. The script moves some files and this is what is causing the issues. When I run the script manually, i.e. form the shell it executes correctly. When I try and run the script from my console application the bulk of the proces...

WSH 5.7's shell.Run executes wrong Scripting Host engine?

I use a WSC (a COM server written in JScript and run with scrobj.dll) that starts also other script files using shell.Run("TheOtherScript.js"); The WSC server is instantiated with new ActiveXObject(PROGID). Until WSH 5.6 I could set the execution engine for shell.Run with the command WScript //H:CScript or with //H:WScript to get the...

Returning COM object to JScript

Hi. I am trying to pass a COM object from an ActiveX component to JScript. So far I have tried the following method of doing so: STDMETHODIMP CHSNetwork::CreateIPPPacket(VARIANT ** ppv) { IIPPacket *iipp; HRESULT hr = CoCreateInstance(CLSID_IPPacket, NULL, CLSCTX_ALL, IID_IIPPacket, (void **)&iipp); if(SUCCEEDED(hr) && ppv) ...

How do you pass a javascript variable as an argument to a vbscript function (in the context of HTAs)?

I am writing an HTA and I need to pass a variable that I have in Javascript to a VBScript function. Can you please let me know how to do this? Here is a (nonworking) example of what I'm trying to do: <!DOCTYPE ... > <html> <head> <HTA:APPLICATION ID="chrome" APPLICATIONNAME="kiosk" ... /> ... <script type="text/javascrip...

Audio on mouseover

It it working partially, but how do I get the below to work with multiple audio files: <!DOCTYPE HTML> <html> <body> <script language="javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"&gt;&lt;/script&gt; <script type="text/javascript"> $(function(){ var birdhover = $('.birds'); ...

event in jscript

in jscript i have com object that have event that call"Hungry" i want to bind function to the eventhandler how should i do it? (when i debug the script i can see that the object have a function add_Hungry(value), what the value i have to send??) ...

What is the most valuable scripting language, VBScript or JScript?

What is the most valuable scripting language, VBScript or JScript? ...

Facebook - Jscript in address bar safe?

I got this in my Facebook messages telling me to paste this in my address bar to help them get some item in some game. Of course I didn't do it yet, but is this okay to do? Did my friend catch a virus or is this actually part of the game? If not, what does this actually do? Thanks for any help in advance. //Note: Don't Try This Yourself...

How to call Windows API functions in JScript?

I would like to obtain the current process id in a JScript script. This id is returned by the Windows API GetCurrentProcessId (http://msdn.microsoft.com/en-us/library/ms683180.aspx) function. How do I call this function in JScript? This obviously doesn't work: var id = GetCurrentProcessId(); WScript.Echo("ProcessId is " + id); ...