Results 1 to 2 of 2

Thread: Strings [Resolved]

  1. #1

    Thread Starter
    Member Evolute's Avatar
    Join Date
    Sep 2002
    Location
    Portugal
    Posts
    58

    Strings [Resolved]

    How can I check to see if there is, or not, a comma (,) in a textbox value? (JavaScript)

    Thanks!
    Last edited by Evolute; Mar 12th, 2003 at 06:44 AM.
    Evolute

  2. #2
    Frenzied Member DeadEyes's Avatar
    Join Date
    Jul 2002
    Posts
    1,196
    Code:
    function test(val){
    	str = new String(val);
    	return str.search(/,/); // -1 if not found
    }

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