Help pls!

Results 1 to 2 of 2

Thread: Help pls!

  1. #1
    Fion Guest

    Default Help pls!

    &#060;SCRIPT LANGUAGE = "VBSCRIPT"&#062;<BR>Function Validate<BR>&#039 a lot of code crucial for validation involving msgbox and &#060;txtFields&#062;.focus()<BR>end function<BR>&#060;/SCRIPT&#062;<BR>using a submit button called "btnSubmit":<BR>&#060;% if Request.Form("btnSubmit") &#062; "" then<BR>&#039can or how to call Validate?<BR>&#039Insert function to insert values into table<BR>end if<BR>%&#062;<BR>

  2. #2
    Larrie Guest

    Default RE: Help pls!

    I presume from the code that the validation is to be done client side before submitting to the server. If so, the btnSubmit needs the event OnClick="Validate();" which will call the Validate routine before submitting the form. The Validate routine should be writtin in JavaScript unless you know your client base is all IE on Windows.<BR>This should return false for failing the validation which will stop the form submission, otherwise return true for correct validation which will submit the form.<BR>Hope this helps.

Posting Permissions

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