jscript

Can't find variable: $

倾然丶 夕夏残阳落幕 提交于 2019-12-01 19:41:21
问题 var scriptFile = $(tempNode).attr("customJScriptSrc"); When passing this i get “Reference Error: Can’t find variable: $” Kindly suggest me any alternative methods. 回答1: add this script: <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> at top of the document(added before your javascript code). or download the library and reference it in you code. 回答2: I had this same problem and it was caused by me putting my .js file before the jQuery .js file in the DOM

Finding out if a URL param exists in JS-ASP

家住魔仙堡 提交于 2019-12-01 13:29:23
I am editing other people's code, written in server-side JS for ASP, and have run into a problem that probably has a very simple solution. I'm outputting some code from a URL param like this: <%=Request.QueryString("param")%> The problem is that if the param doesn't exist, I need to do something else. So I tried: <% var param = Request.QueryString("param"); if (!param) { param = "Some Default Value"; } %> <%=param%> The problem is that the if never seems to evaluate to true , even when the URL param is missing. I'm guessing that the !image condition doesn't work here. What should my test

Summarize table using C# and JScript

喜夏-厌秋 提交于 2019-12-01 13:28:57
I've written code in C# to summarize values of InvoiceTable and move those summarized values to to GroupTable in Abbyy FlexiCapture. The Software is comparatively new and does not show any error when I run it. There are two sets of code to be written: In TechField. In EventHandlers. InvoiceTable consists of: TariffNumber ShipQty Amount COO GroupTable consists of: HSCode Qty Amt CountryOO EventHandlers code is as follows (C#): if (ChangedStates.Has(7)) { int currentRow = 0; int i; for (i = 0; i < Document.Field("Invoice2\\InvoiceTable").Items.Count; i++) { if (Document.Field("Invoice2\

hide Excel tab from Javascript code

家住魔仙堡 提交于 2019-12-01 12:58:16
How can I hide an Excel tab programmatically through Javascript. ExcelSheetName.Visible=False doesn't seem to work. I've googled a lot but yet not received the right solution. How to do that ? To hide an Excel sheet, set the Visible property of the corresponding Worksheet object to 0 or false . For example, if you have an Excel file with two sheets named Sheet1 and Sheet2 , the following code will open this file with the Sheet1 hidden: var objExcel = new ActiveXObject("Excel.Application"); objExcel.Visible = true; objExcel.Workbooks.Open("C:\\Book1.xlsx"); objExcel.ActiveWorkbook.Sheets(

Finding out if a URL param exists in JS-ASP

纵饮孤独 提交于 2019-12-01 11:12:11
问题 I am editing other people's code, written in server-side JS for ASP, and have run into a problem that probably has a very simple solution. I'm outputting some code from a URL param like this: <%=Request.QueryString("param")%> The problem is that if the param doesn't exist, I need to do something else. So I tried: <% var param = Request.QueryString("param"); if (!param) { param = "Some Default Value"; } %> <%=param%> The problem is that the if never seems to evaluate to true , even when the

How can I split a binary file into chunks with certain size with batch script without external software?

岁酱吖の 提交于 2019-12-01 10:34:43
There are many reasons to want to split file into chunks - mainly for network transfer (e.g. e-mail attachments) but I'm sure there are scenarios that could require such thing I cannot imagine. So how can a file be split into chunks that can be easily assembled back to original file (including non-windows systems) ? What are possibilities: MAKECAB - the built-in Windows archiver - it can compress file and split it , but will be difficult to assemble the file on non-Windows machine. WSH/Jscript/VBscript - binary files can be easy processed with ADODB Streams.And according to me JScript is

Summarize table using C# and JScript

好久不见. 提交于 2019-12-01 10:12:42
问题 I've written code in C# to summarize values of InvoiceTable and move those summarized values to to GroupTable in Abbyy FlexiCapture. The Software is comparatively new and does not show any error when I run it. There are two sets of code to be written: In TechField. In EventHandlers. InvoiceTable consists of: TariffNumber ShipQty Amount COO GroupTable consists of: HSCode Qty Amt CountryOO EventHandlers code is as follows (C#): if (ChangedStates.Has(7)) { int currentRow = 0; int i; for (i = 0;

Call a function written on VB from a JScript code (classic ASP)

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-01 04:36:35
Currently I have to deal with the legacy system written in VB. I'm not good with VB and ASP, so I decided that new code for this system will be written in JScript. However, there is some problem with interoperability between the two languages: namely, when I'm trying to call some function declared in <script language="vbscript"> tag, it fails with a " Object expected " error (if the page language is VBScript), and vice versa. Namely, the following code: inc.asp <script language="vbscript" runat="server"> Sub VBTestFunction(Message) Response.Write "VBTestFunction: " & Message End Sub </script>

How to pass an argument that starts with “//” to a wsh script?

China☆狼群 提交于 2019-12-01 04:27:24
If I have the following script (that just prints the first argument to the console): @if (@X)==(@Y) @end /* JScript comment @echo off cscript //E:JScript //nologo "%~f0" %* exit /b %errorlevel% @if (@X)==(@Y) @end JScript comment */ WScript.Echo(WScript.Arguments.Item(0)); And I try something like C:\>test.bat "//test" I get the following error Input Error: Unknown option "//test" specified. Despite the quotes.It is taken as an option to the the windows script host. How can pass an argument that starts with // . Named arguments? cscript //E:JScript //nologo "%~f0" // %* Pass a double slash to

Call a function written on VB from a JScript code (classic ASP)

亡梦爱人 提交于 2019-12-01 03:17:27
问题 Currently I have to deal with the legacy system written in VB. I'm not good with VB and ASP, so I decided that new code for this system will be written in JScript. However, there is some problem with interoperability between the two languages: namely, when I'm trying to call some function declared in <script language="vbscript"> tag, it fails with a " Object expected " error (if the page language is VBScript), and vice versa. Namely, the following code: inc.asp <script language="vbscript"