1
   

Help.. Check for string in a textbox !!

 
 
Reply Mon 5 Feb, 2007 11:34 am
Hi there !!

How can I check a textbox (like this one, for example) for a string (like "chuck") ?? I want to check this when I press a button !!

I want to be sure no offending letters are used before submitting in a forum, and that when this offending letter is found, it should pop up a message.. else OK !!

Thanks guys..
Your help urgently requested.

Regards,
Bijon
  • Topic Stats
  • Top Replies
  • Link to this Topic
Type: Discussion • Score: 1 • Views: 679 • Replies: 3
No top replies

 
timberlandko
 
  1  
Reply Mon 5 Feb, 2007 01:35 pm
http://img212.imageshack.us/img212/3599/chuckcheck2af6.jpg
0 Replies
 
Craven de Kere
 
  1  
Reply Sat 19 May, 2007 10:10 am
You can access the form input at: document.formname.inputname.value in javascript.

Then run what you want on it and alert/popup as desired.

Of course, to truly scale you should use post-backs and "AJAX".
0 Replies
 
Monger
 
  1  
Reply Sat 19 May, 2007 04:41 pm
Or, alternatively, document.getElementById("YourTextareaID").value

Regular expressions used correctly can also be very helpful for many kinds of validation.
0 Replies
 
 

Related Topics

Webdevelopment and hosting - Question by harisit2005
Showing an Ico File - Discussion by Brandon9000
how to earn money in internet - Discussion by rizwanaraj
The version 10 bug. Worse then Y2K! - Discussion by Nick Ashley
CSS Border style colors - Question by meesa
There is no Wisdom in Crowds - Discussion by ebrown p
THANK YOU CRAVEN AND NICK!!! - Discussion by dagmaraka
I'm the developer - Discussion by Nick Ashley
 
  1. Forums
  2. » Help.. Check for string in a textbox !!
Copyright © 2024 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.03 seconds on 06/01/2024 at 04:46:42