Click here to Skip to main content
11,795,568 members (78,724 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: VBScript Javascript
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
Edited 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 at 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 at 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
0 Maciej Los 340
1 Sergey Alexandrovich Kryukov 316
2 OriginalGriff 285
3 Abhinav S 223
4 KrunalRohit 214
0 OriginalGriff 1,797
1 Maciej Los 1,415
2 KrunalRohit 1,240
3 CPallini 840
4 ppolymorphe 808

Advertise | Privacy | Mobile
Web02 | 2.8.151002.1 | Last Updated 1 May 2011
Copyright © CodeProject, 1999-2015
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