0 Replies - 1252 Views - Last Post: 13 May 2010 - 09:17 AM

#1 rgfirefly24  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 448
  • View blog
  • Posts: 2,184
  • Joined: 07-April 08

Calling function from a .vbs file in a .asp file

Posted 13 May 2010 - 09:17 AM

So i have a Function that was given to me in a .vbs file. I need to include the file in my classic asp page and then call the functioned defined in the .vbs file. I have done a lot of googling and there really isn't anything on this type of thing.

My question is: How do you call a vbscript function that is inside a .vbs file in a web page?

here is where I'm including the .vbs file:
    <script type="text/javascript" src="Java-script/sorttable.js"></script>
    <script type="text/vbscript" src="Vbscript/MakeTable.vbs"></script>
    <link rel="Stylesheet" type="text/css" href="Css/File.css" />

The file is found when attempting to make the call, however it gives a Type Mismatch: MakeTable when i run the webpage

   MakeTable "HistoryTable",rs2,False,"","TitleText"

Here is the function definition i was given:

public function MakeTable(tableClass,recordSet,ShowHeaders,FriendlyHeaderNames,TableTitle)
public function MakeTable(String,recordset,Boolean,Array,String)

and here is the error:

Microsoft VBScript runtime
Number: (0x800A000D)
Description: Type mismatch: 'MakeTable'
RemoteIP: <removed>
ServerIP: <removed>

I have tried using EXECUTE, tried renaming the file to see if possibly that was causing an error. Nothing is working. I'm thinking that its just not possible to call a function from vbs files like you can from .js files

Is This A Good Question/Topic? 0
  • +

Page 1 of 1