Calling VB function in Javascript

Results 1 to 2 of 2

Thread: Calling VB function in Javascript

  1. #1
    Join Date
    Dec 1969

    Default Calling VB function in Javascript

    Hi guys,<BR>Is it possible to call a VB function in Javascript. <BR>Here is the sample code which I am trying to do.<BR><BR>&#060;script language="Javascript"&#062;<BR>function ValidateBrUpdate(theForm)<BR>{<BR>var vparent;<BR>var vemployee;<BR>var errparent;<BR>var erremployee;<BR><BR>vparent = theForm.UpdParent.value;<BR>vemployee = theForm.UpdMgrEmp.value;<BR><BR>HERE I NEED TO CALL THE VB FUNCTION ProcessParentError(vparent)<BR><BR>if (errparent != 0){<BR> alert ("No branch exists");<BR> return false;<BR>}<BR>return true;<BR>}<BR>&#060;/script&#062;<BR><BR>&#060;%<BR>Function ProcessParentError(Parent)<BR>Dim strSQL<BR>Dim rs<BR><BR>strSQL = "SELECT Branch# FROM Branch WHERE Branch# = &#039;" & Parent & "&#039;"<BR>Set rs = Server.CreateObject("ADODB.Recordset")<BR>rs.Open strSQL, db<BR>If Not rs.EOF Then<BR> ProcessParentError = 0<BR>Else<BR> ProcessParentError = 1<BR>End If<BR>rs.Close<BR>Set rs = Nothing<BR>End Function<BR>%&#062;<BR><BR>Any help is very much appreciated.<BR><BR>Thank you<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Calling VB function in Javascript

    You can&#039;t call server side code from the client side. Re-submit the page or something.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts