Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Dynamic call VBScript file in ASP

 
Logged in as: Guest
arrSession:exec spGetSession 2,3,30503
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> ASP >> Dynamic call VBScript file in ASP
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Dynamic call VBScript file in ASP - 1/31/2006 2:15:43 PM   
  jasonlowp

 

Posts: 1
Score: 0
Joined: 1/31/2006
Status: offline
 
Lately I have an web e-form application under construction. As a requirement, there are several eforms require individual form input validation rule set. The form(s) will be posted to a common cgi gateway let say 'request.asp'. Form ID is one of the parameter will be submited to the ASP file, then the ASP file should dynamically call the corresponding VBS file to verify the form inputs, then return response message of validation result if there is any input errors.

I would like to ask, if there is any method to call the VBS files dynamically depends on the Form ID submitted. Each VBS file should have the same validation function (something like the Interface concept in OOP) but have its own implementation of validation/rule set.

My idea is something like that:

<%
Dim sResultMsg
 
If request("form_id") = "FORM001" Then
    sResultMsg = FORM001.Verify()
    If sResultMsg <> "" Then
        Response.Write(sResultMsg)
    End If
End If
 
If request("form_id") = "FORM002" Then
    sResultMsg = FORM002.Verify()
    If sResultMsg <> "" Then
        Response.Write(sResultMsg)
    End If
End If
%>

P.S.: FORM001.vbs, FORM002.vbs...etc are the validation libraries.

Thanks a lot!
 
 
Post #: 1
 
 RE: Dynamic call VBScript file in ASP - 2/1/2006 7:23:41 AM   
  ebgreen


Posts: 4595
Score: 29
Joined: 7/12/2005
Status: offline
You should be able to call the script and give it a command line parameter to cause it to behave different ways for different situations.

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to jasonlowp)
 
 
Post #: 2
 
 RE: Dynamic call VBScript file in ASP - 3/29/2006 4:37:33 AM   
  mrgoodwin

 

Posts: 14
Score: 0
Joined: 3/29/2006
Status: offline
You should be able to pass it as an argument.

I.E.

FileName.vbs form1
Filename.vbs form2

etc.

(in reply to jasonlowp)
 
 
Post #: 3
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> ASP >> Dynamic call VBScript file in ASP Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts