Linking to external VBS file

  • fs22
  • Born
  • Born
  • fs22
  • Posts: 1

Post 3+ Months Ago

I have an external vbscript file that I have linked to my page in the head. I am writing some javascript to interact with the functions in the external .vbs file. Here is the external script code...
Code: [ Select ]
Dim o3web

Sub window_onload
  Set o3Web = createObject("triadweb.cls3Web")
  o3Web.Init()
End Sub

Sub window_unload
  Set o3Web = NOTHING  
End Sub

Function sCurrentUser()
  sCurrentUser=o3Web.sCurrentUser()
End Function

Here is my javascript/head code...

<script language="VBScript" src="score.vbs" type="text/VBScript"></script>

<script language="JavaScript">
  var sUser=o3Web.sCurrentUser();
</script>
  1. Dim o3web
  2. Sub window_onload
  3.   Set o3Web = createObject("triadweb.cls3Web")
  4.   o3Web.Init()
  5. End Sub
  6. Sub window_unload
  7.   Set o3Web = NOTHING  
  8. End Sub
  9. Function sCurrentUser()
  10.   sCurrentUser=o3Web.sCurrentUser()
  11. End Function
  12. Here is my javascript/head code...
  13. <script language="VBScript" src="score.vbs" type="text/VBScript"></script>
  14. <script language="JavaScript">
  15.   var sUser=o3Web.sCurrentUser();
  16. </script>

I am getting the error that o3Web is null. Does anyone know why?
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

Post Information

  • Total Posts in this topic: 1 post
  • Users browsing this forum: spork and 76 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.