jscript

Debugging JScript in MS Script Debugger

Hello. I need to write an extension to Terrasoft CRM software which allows expansion by the means of JScript. There is no "real" IDE, so when I code something, I need to restart the client and then do what is intended to trigger the code. If something goes in an unexpected way, MS Script Debugger window pops up, pausing execution on some...

C# UpdatePanel Update seems to be working in Firefox but not IE

I've got a page with several Update Panels on it. The first has a panel with a gridview which has an event to close the panel and update the UpdatePanel - then populate a control in a second updatepanel. It seems to work fine in firefox but in IE the panel appears to not respect the visible=false. The gridview is not databound so it do...

JQuery event model and preventing duplicate handlers

Once again I want to load a page which contains its own script into a div using $("divid").load(...). The problem I face is related to events. Let's say we trigger("monkey") from the parent page and on the loaded page we bind("monkey") and just do an alert("monkey bound"). If the same load method is called multiple times, the bind is ...

setTimeout not working in windows script (jscript)

When I try to run the following code in my program setTimeout("alert('moo')", 1000); I get the following error Error: Object expected Code: 800A138F Source: Microsoft JScript runtime error Why? Am I calling the wrong function? What I want to do is delay the execution of the subsequent function. ...

JavaScript date constructor and timezone

The Date constructor in JavaScript/ECMAScript/JScript allows passing the number of milliseconds since midnight, 1/1/1970. Nowhere can I find documentation whether this is midnight in the client machine's timezone, or midnight GMT. Which is it? Can it be relied on between different browsers and versions? Is this officially documented a...

C# COM server access from JScript

I have a COM server, implemented in C#. It exposes a class decorated like this: [ComVisible(true)] [ProgId("MyServer.MyClass")] [ClassInterface(ClassInterfaceType.AutoDispatch)] I registered the DLL with "regasm /codebase MyServer". This server must be used from a WSC (a COM server implemented in JScript). Therefore I used the AutoDis...

JavaScript killing a process

I am writing using JavaScript. I have a PID of a process. How do I kill it? You can terminate by a name using WMI, How can you do it using PID? UPDATE: The platform is Windows. ...

How to control Windows system volume using JScript or VBScript?

I want to control the volume of my Windows system from a JScript or VBScript script. Any ideas? Also, can I unmute the system volume if it is muted? ...

Provide COM objects for JScript

Hello, I need to access a component in JScript. I found the Wcript.CreateObject(progid) as well as "new ActiveXObject(progid)" would create an instance of the component. The component should draw graphics in a own window to show, what the JScript script is doing. The operation systems supported must include Windows XP 32 bit as well a...

Copy external HDD

I want to write an app. (web-based if possible) to copy an external HDD (already partitioned and containing data) to a like HDD with the same partitions-- does anyone think this would be possible with Java (Google App Engine? To convert Java app and run in web environment? Or likewise) Thoughts on if anything thinks this would be possib...

JScript: How to give focus to popup window

I'm making new window this way: var WSHShell = WScript.CreateObject("WScript.Shell"); WSHShell.Popup("This is popup."); But window appears under another ones. How can I move it to the front? ...

400 Bad Request : Consuming WCF basicHttpBinding (Soap) using JScript/VBScript

var oXMLDoc, oXMLHttp, soapRequest, soapResponse; oXMLHttp = new ActiveXObject("Microsoft.XMLHTTP"); oXMLHttp.open("POST", "http://nerdbox/HelloService.svc", false); // Add HTTP headers oXMLHttp.setRequestHeader("Content-Type", "text/xml; charset=utf-8"); oXMLHttp.setRequestHeader("SOAPAction", "http://tempuri.org/IHelloService/SayHel...

Automating Word to insert an image from a URL

Hello, from Automation in jscript how can I programatically insert an image into Word (2000+) from a URL? The url also is quite long, around 400 characters, and I've read that Word 2007 has a problem sometimes with strings longer than 255 characters. I've used this successfully except that it won't allow urls longer than 255 character...

SqLite and Classic ASP with JScript

SqLite is widely pitched as zero install, however I am having problems understanding how I can write data from an asp web form to an sqlite database without installing a dll. Am wondering if you could point me to some reference as to how to configure sqlite on an ASP server so I can connect to an sqlite database. In addition is there a...

When I try to use Msxml2.ServerXMLHTTP the server raises an error

When I do: var xmlhttp = Server.CreateObject("Msxml2.ServerXMLHTTP"); xmlhttp.Open("GET", "http://google.com", false); xmlhttp.Send(); it raises this error: Microsoft JScript runtime error '800a01b6' Object doesn't support this property or method /library/Page.asp, line 10 With Microsoft.XMLHTTP everything wor...

how to call jscript onFormSubmit() with eventArgs e (classic asp)

If I have the following jscript code on a classic asp page, how do I supply the "eventArgs e" in the call so it will be available here in the jscript? The "eventArgs e" being an asp.net term, I am not sure what is used here. response.write "<script type='text/javascript'>" response.write "function onFormSubmit(e)" response.write "{ va...

API to get hostname from Jscript

Hi, I am not sure why my previous post was not listed. Lets see if this one gets listed. I have a stand alone jScript which passes parameters to a C# program. I have to pass hostname to the C# program. Is there an api which I can use to get hostname in the jScript if not can I do it using the 'hostname' system command? Thanks in Advance...

How to match a regex pattern with a string by providing it a starting line no. and ending line no. within which the search should be performed?

I am writing a small windows script in javascript/jscript for finding a match for a regexp with a string that i got by manipulating a file. I know the line number for starting and ending of the search. But I am stuck at this position for a while. ...

How to find whether a given path is absolute/relative and convert it to absolute for file manipulation?

I am writing a small windows script in javascript/jscript for finding a match for a regexp with a string that i got by manipulating a file. The file path can be provided relative or absolute. How to find whether a given path is absolute/relative and convert it to absolute for file manipulation? ...

Javascript, IE, Strings, and Performance problems

Hey guys, So we have this product, and it's really slow in IE. We've already applied a lot of the practices advised by the IE guys themselves (like this, and this), and try to sacrifice clean code for performance in the critical parts like DOM manipulation. However, as you can see in this IE profiler screenshot.. Just "String" is the...