Results 1 to 2 of 2

Thread: urgent

  1. #1
    Join Date
    Dec 1969

    Default urgent

    how to validate a text box on the client side can you give me the code

  2. #2
    Franco Guest

    Default RE: urgent

    If you have a button which the user clicks when they&#039re finished, the code is something like:<BR><BR>function btnOK_click() {<BR>if(isNaN(txtUserInput.value)) {<BR>alert("It&#039s not a number!");<BR>return;<BR>}<BR><BR>if(txtUserInput. value!="WhatIExpectToSee") {<BR>alert("This isn&#039t what I expect to see!");<BR>return;<BR><BR>//when you&#039ve finished validating, you can send the user elsewhere (or back to the same page) through:<BR><BR>this.location="NewPage.asp";<BR><B R>hth<BR><BR>Franco

Posting Permissions

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