jscript

Write binary data using javascript on the server

五迷三道 提交于 2019-12-23 18:45:35
问题 I'm trying to output a PDF using server side javascript (ASP). The current method I'm using is: xfile=Server.MapPath(lib.fso.GetTempName()) xf=lib.fopen(xfile,"wb"); lib.fwrite(xf,this.buffer); lib.fclose(xf); outB = Server.CreateObject("ADODB.Stream") outB.Type = 1 outB.Open() outB.LoadFromFile (xfile) Response.BinaryWrite(outB.Read()) outB.Close() lib.fso.DeleteFile(xfile); This works, but requires write access on the server. Is there a way to do the same thing without writing to a file? I

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

Deadly 提交于 2019-12-23 13:09:03
问题 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, which calls this line a "Bad Assigment". But it works! Is it ECMAscript standard compatible to have a function's return value as an lvalue (like here)? If yes: How would one write such a function? 回答1: Yes, the standard permits functions to returns

Can I digitally sign JScript (.js) or VBScript (.vbs) files?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-23 12:54:16
问题 I know that one can sign a Windows binary executable file using signtool. So all this time I was under assumption that one cannot sign any of the files interpreted by Windows Script Host , such as JScript (.js) or VBScript (.vbs) because those are mere text files. But today, while opening a .js file that I downloaded off my web site, I was greeted by this warning: So does this mean that there's a way to sign those .js / .vbs files? If so, then how? 回答1: Just to finalize my original question.

input field validation does not work under internet explorer 11 why

孤街醉人 提交于 2019-12-22 14:13:28
问题 Unable to get the following code to do field validation for email and to accept only certain emails input as per my code..this code works in all browsers accept Internet explorer 11, how can adopt this code to work under I.E 11 to only accept from certain email format addresses... under I.E. 11 - it checks for empty field ok but i can not get the email pattern to work (html5) how can i get it to work under IE 11, it works on other browsers okay, thanks in advance...singhy <?php if(isset($

input field validation does not work under internet explorer 11 why

半世苍凉 提交于 2019-12-22 14:13:13
问题 Unable to get the following code to do field validation for email and to accept only certain emails input as per my code..this code works in all browsers accept Internet explorer 11, how can adopt this code to work under I.E 11 to only accept from certain email format addresses... under I.E. 11 - it checks for empty field ok but i can not get the email pattern to work (html5) how can i get it to work under IE 11, it works on other browsers okay, thanks in advance...singhy <?php if(isset($

Prompt dialog in WSH using JScript?

时光怂恿深爱的人放手 提交于 2019-12-22 03:09:53
问题 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. 回答1: I think the WScript object does not provide such a method however you can show an input box from vbscript running on WSH. So here is one possible solution which lets you call that VB function from within JS! Please note the file extension for the following

What's the difference between JavaScript and JScript?

白昼怎懂夜的黑 提交于 2019-12-17 02:59:41
问题 I have always wondered WHaT tHE HecK?!? is the difference between JScript and JavaScript. 回答1: Just different names for what is really ECMAScript. John Resig has a good explanation. Here's the full version breakdown: IE 6-7 support JScript 5 (which is equivalent to ECMAScript 3, JavaScript 1.5) IE 8 supports JScript 6 (which is equivalent to ECMAScript 3, JavaScript 1.5 - more bug fixes over JScript 5) Firefox 1.0 supports JavaScript 1.5 (ECMAScript 3 equivalent) Firefox 1.5 supports

Defining parameters for executing stored procedure - Classic ASP

守給你的承諾、 提交于 2019-12-14 03:56:03
问题 I am trying to update some old functionality. There is a stored procedure that has one input parameter and two output parameters. I am getting the following error when I try to execute the code: Microsoft OLE DB Provider for ODBC Drivers error '80040e21' Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done. /student.asp, line 30 Stored Procedure: ALTER PROCEDURE [Api].[GetKeyByAuthId] @AuthenticationId uniqueidentifier , @Key int =

input fill with keypress simulation

人走茶凉 提交于 2019-12-13 17:12:13
问题 Let's say we have an input and we want to add some texts to it. <form> First name:<br> <input type="text" id="thename" name="firstname"> </form> The simple thing is to add value to input with classic element.value... . But what if I want to add for example 'David' by simulating the keypress event? I followed several approaches like this: function simulateKeyEvent(character) { var evt = document.createEvent("KeyboardEvent"); (evt.initKeyEvent || evt.initKeyboardEvent)("keypress", true, true,

Launching or running ica file with autoit script

瘦欲@ 提交于 2019-12-13 07:13:55
问题 I am trying to run a .ica file that I exported from XenApp from an autoit script, I used the run command and it did nothing. Any alternatives will be appreciated. Due to the sensitive nature of the .ica file i am unable to post the contents, but here is what i have so far for the autoit script. Global $username = "" Global $password = "" Global $userinput Global $passwordinput $userinput = InputBox("HUB ID","Please Enter your HUB ID") $passwordinput = InputBox("Password","Please Enter Your