Results 1 to 2 of 2

Thread: Buttons

  1. #1
    Frik Guest

    Default Buttons

    I have an ASP page that do some client side validation. On this form i have a submit button (Add), a change, a delete and list button. At this stage all the buttons are submit buttons. <BR><BR>On the client side validation only the add buttons data needs to be validated. WHenever i click (submit) the other buttons it does the validation as well. I have changed the one button to "button" but then i can get the form to "submit"&#062; how can i tell the system to only to validate when it is add ?<BR><BR>My code for the validation is :<BR>Function frmMachineMaint_onSubmit()<BR> if frmMachineMaint.txtMachineDesc.value = "" then<BR> alert "Please Enter a Machine Description"<BR> frmMachineMaint.txtMachineDesc.focus<BR> frmMachineMaint_onSubmit = false<BR> end if<BR> end function<BR><BR>Your help is appreciated<BR><BR>

  2. #2
    pink Guest

    Default RE: Buttons

    Function frmMachineMaint_onSubmit()<BR>submitbtn=Request.Fo rm("add_btn")<BR>if submitbtn="add" then<BR>if frmMachineMaint.txtMachineDesc.value = "" then<BR>alert "Please Enter a Machine Description"<BR>frmMachineMaint.txtMachineDesc.foc us<BR>frmMachineMaint_onSubmit = false<BR>end if<BR>end if<BR>end function<BR><BR>

Posting Permissions

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