Calling server side function from client side scri

Results 1 to 2 of 2

Thread: Calling server side function from client side scri

  1. #1
    Glenn Hayes Guest

    Default Calling server side function from client side scri

    Is it possible to call a server side script from a client side script. I am trying to create a vbscript server function that will validate a date field. The client side validation will call this vbscript function passing the I don&#039t want to use client side vbscript because it is not supported by Netscape. The problem is how do I pass the form value to server side script? If I hard code a date value then both functions work fine. If I pass the then all values entered are treated as invalid dates. I have included the server side script and the client side script code snippets. The client side script will be called by the forms onSubmit.<BR><BR>&#060;Script Language="VBScript" RunAt="Server"&#062;<BR>Function CheckDate(ByVal DateIn) &#039As Boolean<BR> CheckDate = IsDate(DateIn)<BR>End Function<BR>&#060;/Script&#062;<BR><BR>&#060;script LANGUAGE="JavaScript"&#062;<BR>&#060;!-- hide from old browsers<BR>//function for form validation<BR>function Validate()<BR>{<BR>var dateresult = "&#060;%=CheckDate(" lue")%&#062;";<BR>if (dateresult == "False")<BR>{<BR>alert("Invalid From Date entered.");<BR>return false;<BR>}<BR>// --&#062;<BR>&#060;/script&#062;<BR><BR>Thanks for your help.<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Calling server side function from client side

    I think you can do by writing Request.form instead of ("document.namestem.From_date.value"). I am not sure, just test it.

Posting Permissions

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