Today I figured out that it is actually possible to have Javavscript functions and VBScript functions on one page and it is also possible to call a VBScript function from a JavaScript function. Previously, I didn’t think it’s possible - scripting geeks, please forgive me.
The call can be made as simply as described in the code below:
<script language = “javascript”>
function fnJavaFunction()
{
var strVar;
strVar = fnVBFunction();
//Next line writes “Result”
document.write(strVar);
}
</script>
<script language=”vbscript”>
function fnVBFunction()
dim strResult
strResult = “Result”
‘Next line stores result of the VBScript function
fnVBFunction = strResult
end Function
</script>





February 10th, 2009 - 8:01 am
Thanx for this it really helped me a lot i think combining java and VB is awesome task and not so hard to do comparing to other languages.
February 10th, 2009 - 7:20 pm
Very good function example. I could use that from time to time for sure.
February 12th, 2009 - 3:50 pm
Thank you for the good example. It helped me a lot. I look forward to see more examples in future.
February 13th, 2009 - 9:19 am
Thanks for tips
I have written a couple function in Java script in my index
Now I want to use these function in my other pages without cutting and pasting the code in each of the pages.I write Is there way to call these Java script function form an index an external file just like CSS code we call from external file
Any help would be apprecated
Thanks
February 13th, 2009 - 11:38 am
@Marble Host: All you need to do is to put your shared javascript file something.js into the accessible directory and in all files that access javascript functions from this file add a line
[Please you your real name next time when writing a comment or write something like "YourName - Owner of Marble Host"].
February 21st, 2009 - 1:00 pm
Hi George,
Pretty much coding example, as of your good example i got rid off from fear of Java scripting side code..