473,416 Members | 1,547 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,416 software developers and data experts.

Execute Javascript within VBscript

200 100+
Hi, I need help please:

The foll code works within a WebTextEdit - ClientSideEvents: (javascript)
Expand|Select|Wrap|Line Numbers
  1.   var edit = igedit_getById("FG1010NItemD");   edit.Element.style.backgroundColor = 'red';
  2.  
I need to execute this code within a VBscript code window:

I would like to add the above code & set the WebTextEdit object:

Expand|Select|Wrap|Line Numbers
  1. If "aObjects("FG1010NItemD")" = "avar1" then 
  2.  
  3.     var edit = igedit_getById("FG1010NItemD");      edit.Element.style.backgroundColor = 'red';
  4.  
  5. End If 
Please Assist, Regards
Oct 14 '08 #1
5 1874
acoder
16,027 Expert Mod 8TB
Put those two statements in a JavaScript function and then call that within the VB code.
Oct 14 '08 #2
ismailc
200 100+
Thanks but how do I do this:

Within a Vbscript window:

Expand|Select|Wrap|Line Numbers
  1. <script language="javascript"> 
  2. function test()
  3. {
  4. var edit = igedit_getByI("FG1020NShortD");
  5. edit.Element.style.backgroundColor = 'red';
  6. }
  7. </script>
  8.  
  9. If "aObjects("FG1020NShortD")" = "avar1" then
  10.  test();
  11. End If
  12.  
  13.  
Does not work - does not like the code, Please Assist!
Oct 14 '08 #3
acoder
16,027 Expert Mod 8TB
As a full member now, you should know that we expect your code to be posted in [code] tags (See How to Ask a Question).

This makes it easier for our Experts to read and understand it. Failing to do so creates extra work for the moderators, thus wasting resources, otherwise available to answer the members' questions.

Please use the tags in future.

Moderator.
Oct 14 '08 #4
acoder
16,027 Expert Mod 8TB
The VB-script code must appear within script tags (like JavaScript code).
Oct 14 '08 #5
rnd me
427 Expert 256MB
looks like you have too many quotes in the vbscript code.
Oct 14 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: John Benson | last post by:
Hi, I'm in a tightly-secured environment where I may not be allowed to use Python for some scripting work, and may have to fall back on what came with Windows 2K. I'm cracking "VBScript in a...
7
by: NewbieJon | last post by:
I am attempting to send the variable "sComputerName" from my ActiveX script to "GetInfo.asp" using javascript. (Having been advised this is the way to get my ActiveX variable into my ASP script) ...
3
by: Andy | last post by:
Hi, I am complete JavaScript novice and would really appreciate some help with this code: ===================================================================== <%@LANGUAGE="VBSCRIPT"...
3
by: David Shorthouse | last post by:
Hey folks, Not an off-topic posting.....since I was shot-down in an earlier post...this one's legit. How do I go about calling a server-side vbscript within a client-side javascript function?...
7
by: Privacy Advocate | last post by:
//crossposted to: comp.lang.javascript, alt.comp.lang.javascript in an effort to get factual answers from JavaScript experts// Simply put; Is it possible to obtain the real (actual) IP address of...
1
by: Allen | last post by:
I have installed the Updater Application Block, and then I should Deploy the QuickStarts. " Install the QuickStarts After you install the Updater Application Block, you should install the...
11
by: Hakan ÖRNEK | last post by:
Hi , I register client scripts like this; -------------------------------------------------------------------------- ----------- Public Sub CreateClientAlert(ByVal Message As String, ByVal...
1
by: mikegolden | last post by:
An application I'm working on makes extensive use of output parameters and return values, thus forcing me to use the ADODB Command object to execute the stored procs. For recordset returning stored...
0
by: ismailc | last post by:
Hi, I need help please: The foll code works within a WebTextEdit - ClientSideEvents: (javascript) var edit = igedit_getById("FG1010NItemD"); edit.Element.style.backgroundColor = 'red'; I...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.