in javascript i want use vbscript it can possible
if yes tell me how........:confused: :confused:
Printable View
in javascript i want use vbscript it can possible
if yes tell me how........:confused: :confused:
No man - they can only be kept in seperate HTML <script> tags...
Could you not use document.write to write the VBScript from JavaScript. Or set a label with a name and when some javascript fires use the .outerHTML to write the VBScript?
Actually, yeah - that should work. I meant that the two languages cannot directly interact; however the print output of Javascript/VBS can still pass on vars, etc, between the two independantly.
It would be similar to serverside pre-processed ASP code, for example - only that it is document.write'd from the client script.
EG:P.S: Don't forget to use escaped double quotes (\"), for the VBS strings (i.e. MsgBox parameters) - otherwise the Javascript interpreter may be "upset", and the nested VBScript output won't work properly. Also, use the new line chars (\n), or document.writeln, when necessary.Code:<script language="javascript"><!--
document.write("<script language='VBScript'>\n");
document.write("MsgBox \"VBS output\"\n");
document.write("</script>\n");
--></script>
Thanks for ur reply.......
NP :)
I don't think anyone has asked this but, why?Quote:
in javascript i want use vbscript it can possible
Maybe he prefers VBScript; or it can do something that JScript can't (I think JS is the better language, but nvm...)
Yeah, good point. I think most VBScript functions and methods can at least be emulated in Javascript.
But, if he likes VBScript we'll let him get on with it ;)
I agree - let people use their desired language; if they want...