Click here to Skip to main content
13,005,991 members (109,117 online)
Rate this:
Please Sign up or sign in to vote.
See more:
So there is a textbox with 10 words in it. I am trying to find how many words in the string named ta_val. I already did the javascript but need help in vbscript.


var sArray = ta_val.split("");
var sLength = sArray.length;
a.innerHTML = sLength;

I tried this and it did not work.
dim sArray = split(ta_val,"")
dim sLength = len("sArray")
a.innerHTML = sLength

Is there some place to convert javascript to vbscript? Like a program?
Posted 1-May-11 9:21am
Updated 1-May-11 9:22am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Why would you do this? Javascript is a standard language, VBScript is proprietary.

Look at the ECMA standards on the topic:[^].

This is what Javascript is — an implementation of the ECMAScript:[^].

This is what VBScript is:[^].

All you can do with VBScript you can do with Javascript, not the other way around.
If you need to preserve you work and make it compatible, forget VBScript and use Javascript in all cases.

Yes, I know I don't answer your question. You don't need an answer, you need help.


You will take less time in just learning VBScript than searching for the tool.
By reasons I explained, there are translators from VBScript to Javascript, but I never heard of the opposite.


"You can convert VB to JS but JS to VB… that's just crazy talk."

Do the Google search if you want…

uchihaa 1-May-11 15:39pm
It is for homework, I need to be able to do assignments both ways. Javascript seems to be easier so I am able to do it but not vbscript.
SAKryukov 1-May-11 15:46pm
If this is homework -- quit you school. What can you learn from people giving you such assignments?

OK, read my update...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170628.1 | Last Updated 1 May 2011
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100