Questions tagged [scriptcontrol]

42 questions
1
vote
1 answer

ASP.Net ScriptControl - Add the Javascript get_events method : Possible?

So I've run into a snag, apparently the get_events method is only "included" with the ExtenderControl class. What I need to do: Be able to call the get_events Javascript method using a ScriptControl since using an ExtenderControl isn't really…
Programmin Tool
  • 6,507
  • 11
  • 50
  • 68
1
vote
1 answer

ScriptControl inside UpdatePanel

I have a ScriptControl (requires ScriptManager) with JavaScript to handle client-side interactions and ICallbackEventHandler to communicate back and forth. Everything works perfectly with one or multiple instances of the control on a page. I…
Nelson Rothermel
  • 9,436
  • 8
  • 62
  • 81
1
vote
1 answer

Convert Recursive jQuery For each loop into JavaScript for VBA Script Control

I'm trying to use the following script to iterate through a nested JSON object. It works fine in html, however, I'm calling it from a Excel VBA ScriptControl object. When I do, it returns an "undefined" error for the "$" I'm assuming it's because…
ptownbro
  • 1,240
  • 3
  • 26
  • 44
1
vote
1 answer

ASP.Net Script Controls, Returning False from OnClick, and FireFox

Short Explanation: I have a script control that has the click event being handled in the script file. The Click handler pops up a confirm prompt and returns the prompt's value. Problem: IE sees the return False (Cancel is selected on the confirm…
Programmin Tool
  • 6,507
  • 11
  • 50
  • 68
1
vote
1 answer

VBA JavaScript object doesn't support this property or method

Im trying to get the Text Statistics function from https://github.com/cgiffard/TextStatistics.js/blob/master/index.js Working in Excel I have minified the JavaScript code to shorten the concatenations Function Text_Statistics1(textString As…
Rob
  • 1,235
  • 2
  • 19
  • 44
1
vote
2 answers

evaluating strings in VBA

I have a string that is read from a cell in Excel, which is something like this: ""Horace Lai" & vbNewLine & Date" or this "Chr(149) & "level 1" & vbNewLine & Chr(9) & Chr(149) & "level 2" & Chr(149) & "level 1" & vbNewLine & Chr(9) & Chr(149) &…
Horace
  • 252
  • 2
  • 4
  • 15
1
vote
1 answer

Typescript and ASP.Net IScriptControl

Is there a good way to write the javascript end of an ASP.Net IScriptControl (Microsoft Ajax) in Typescript? The best I've found is https://github.com/chaholl/TypeScriptDefinitions/blob/master/MicrosoftAjax.d.ts - but that doesn't seem to be valid…
1
vote
1 answer

String Addition / Subtraction Function

This was a possibility in VB Script by using a script control with the eval function. For example ScriptControl1.Eval("(10+1.5)") 'Returns 11.5 Is there a way to do this in Vb.Net? The alternative would be to simply split up the string and verify…
Alex
  • 4,821
  • 16
  • 65
  • 106
0
votes
0 answers

Is it possible to replace ScriptControl in VBA to another valid object?

I am running a macro which is using ScriptControl and parsing data with JSON. Now I need to get rid of ScriptControl due the security policies in the company. Microsoft is not updating ScriptControl anymore and to run the macro I need to install one…
0
votes
0 answers

How to load a javascript file into a c# console application

I am stuck with a problem while trying to run a script which is in a file with .js extension in my project. i am trying to load it and call a function in the js file. the code i am using is as bellow: ScriptControlClass js = new…
0
votes
1 answer

Reading a JSON and looping in VBA

I'm getting from the server a JSON string with the statuses of a particular actions. In this case it returns results for 2 actions. For ID: 551720 and ID: 551721 String looks like…
davor.geci
  • 89
  • 10
0
votes
1 answer

Prevent repeating call to proc before certain part of code is executed

i have a tcl script used for test automation (with CarMaker ScriptControl interface) In the script i am calling a proc where some code is executed that may take a few milliseconds before it returns. However, if at a certain point in this proc it…
S Schulze
  • 127
  • 9
0
votes
0 answers

Delphi MSScriptControl JS Can't get a character from string by index

I need to execute a JS script in a Delphi program. There is a problem that bothers me. I put js: OleVariant; into Form1's public section, and then use this code: procedure TForm1.FormCreate(Sender: TObject); begin js :=…
0
votes
1 answer

VB Script with reference script is not working in ScriptControl c#

Hi I am executing a VB script using script control in c#. If it is a standalone script then it works fine for me by using the below code. ScriptControl SC = new ScriptControl(); SC.Language = ScriptType; …
Dah Sra
  • 4,107
  • 3
  • 30
  • 69
0
votes
1 answer

Scriptcontrol object returns recordset object

I am creating a library using vbscript and using scriptcontrol object to call these routines from vba. I am trying to create a recordset as a routine with the given sql as parameter as below sub GetData(sql, byref retrst) stADO =…