Results 1 to 3 of 3

Thread: [RESOLVED] Validation when leaving textbox?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Dec 2005
    Posts
    31

    Resolved [RESOLVED] Validation when leaving textbox?

    How could I make a validation check when the user leaves a textbox?

  2. #2
    Frenzied Member usamaalam's Avatar
    Join Date
    Nov 2002
    Location
    Karachi
    Posts
    1,308

    Re: Validation when leaving textbox?

    Code:
    		private void Page_Load(object sender, System.EventArgs e)
    		{
    			string jsFunction = "";
    			jsFunction += "<script>";
    			jsFunction += "		function Validate() ";
    			jsFunction += "		{";
    			jsFunction += "			alert('Lost Focus');";
    			jsFunction += "		}";
    			jsFunction += "</script>";
    			Response.Write(jsFunction);
    			
    			TextBox1.Attributes.Add("onBlur","javascript:Validate();");
    		}

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Dec 2005
    Posts
    31

    Re: Validation when leaving textbox?

    thanks so much!

Posting Permissions

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



Click Here to Expand Forum to Full Width