Call JavaScript function from VBS 
Author Message
 Call JavaScript function from VBS

Hello,

First posting to this list, so this might be a newbie question:

Is it possible to call a JS function from a VBS sub, more especially
is something like

<a href="javascript:openIT();">Open Window</a>

also possible as:

<script vbs>
sub Button1_OnClick
openIT
end sub
</script>

thanks in advance,



Mon, 28 Nov 2005 18:41:58 GMT  
 Call JavaScript function from VBS

Quote:
>Is it possible to call a JS function from a VBS sub, more especially
>is something like

Yes. Try this little demo:

<html><head>

<script language="javascript">
function hello(txt) {alert(txt);}
</script>

<script language="vbs">
sub relay(msg)
hello msg
end sub
</script>

</head><body>

<input type=button value="Hello, World!" id=btn onClick=relay(btn.value)>

</body></html>
--
Dave "Crash" Dummy - A weapon of mass destruction

http://lists.gpick.com



Mon, 28 Nov 2005 20:27:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Proper syntax for calling JavaScript function from VBS

2. Calling a JavaScript from VBS

3. Call javascript function from vbscript and return value...

4. How do you call javascript function from vbscript?

5. Is it possible to call an applet function from javascript

6. Calling javascript function from vbscript

7. How do I call a VBScript-function from JavaScript in ASP (both server-side)

8. Call a JavaScript function from VB Script

9. Using an embedded quote in a javascript function call parameter

10. calling a JavaScript function from another frame

11. how to call this javascript function?

12. Call JavaScript function from Java Applet code!

 

 
Powered by phpBB® Forum Software