Ver Mensaje Individual
  #3 (permalink)  
Antiguo 24/05/2012, 18:58
Avatar de emprear
emprear
Colaborador
 
Fecha de Ingreso: junio-2007
Ubicación: me mudé
Mensajes: 8.388
Antigüedad: 16 años, 10 meses
Puntos: 1567
Respuesta: llamar a una funcion de javascript desde vbscript ¿ como lo hago?

Si, asi es, includo las variable no es necesario invocarlas globalmente
Código HTML:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  2.    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <title>JS+VBS</title>
  5. <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  6. </head>
  7. <script type="text/javascript">
  8. //<![CDATA[
  9. function fjs(tex){
  10. if(tex){
  11. document.write(tex);
  12. }
  13. }
  14. //]]>
  15.  
  16. <script type="text/vbscript">
  17. '<![CDATA[
  18. Dim texto
  19. texto = InputBox("Tu nombre!","Prueba")
  20. fjs(texto)
  21. ']]>
  22. </body>
  23. </html>

Un detalle a tener en cuenta, el javascript debe anteceder al VBS en el caso de que compartan información

Saludos
__________________
La voz de las antenas va, sustituyendo a Dios.
Cuando finalice la mutación, nueva edad media habrá
S.R.