It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming JavaScript Forum

Compare "(" and ")" count in text input

Compare "(" and ")" count in text input

Postby jt107 on Tue Nov 30, 2010 2:05 pm

I need to do an input text validation which include opening parenthesis and closing parenthesis, what I need to validate is the opening parenthesis match with closing parenthesis. Here is a sample of the entry text:

thisis(test(of(matching(parenthesis)and)if)working

There is one closing parenthesis missing. I would like to warn the user to correct it before submit, but not quite sure how to do it with javascript. Please advice.
jt107
 
Posts: 4
Joined: Tue Feb 02, 2010 5:47 pm

Who is online

Users browsing this forum: No registered users and 5 guests