473,410 Members | 1,953 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,410 software developers and data experts.

Auto validate text box on change

Hello

How would one auto validate using the 'onchange' method a text box for
invalid entries?

Invalid entries would include:

1. Input string of '....'
2. Input string of 'aaaa'
2. Check to see if all entries are uppercase

Thanks greatly
Oct 2 '07 #1
4 6334
Angela said the following on 10/1/2007 11:57 PM:
Hello

How would one auto validate using the 'onchange' method a text box for
invalid entries?
You would call a function that would then check the value of the textbox
and make sure it satisfies your desires for invalid entries and then
return a message of some sort indicating failure to the user if it failed.
Invalid entries would include:

1. Input string of '....'
2. Input string of 'aaaa'
2. Check to see if all entries are uppercase

Thanks greatly
if(textboxRef.value == "....")

The rest is left as an exercise as I have my thoughts that it might have
been one to start with.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Oct 2 '07 #2
In article <UkjMi.36318$nO3.25338@edtnps90>, an****@adjingo.com wrote:
>Hello

How would one auto validate using the 'onchange' method a text box for
invalid entries?

Invalid entries would include:

1. Input string of '....'
2. Input string of 'aaaa'
2. Check to see if all entries are uppercase
Insisting that the user type everything in uppercase is stupid. If it's
important to your application that all entries be in uppercase, then shift
everything to uppercase after it's been entered and let the user type in
lowercase if he wants to.

--
Regards,
Doug Miller (alphageek at milmac dot com)

It's time to throw all their damned tea in the harbor again.
Oct 2 '07 #3
Doug Miller wrote:
In article <UkjMi.36318$nO3.25338@edtnps90>, an****@adjingo.com wrote:
>Hello

How would one auto validate using the 'onchange' method a text box for
invalid entries?

Invalid entries would include:

1. Input string of '....'
2. Input string of 'aaaa'
2. Check to see if all entries are uppercase

Insisting that the user type everything in uppercase is stupid. If it's
important to your application that all entries be in uppercase, then shift
everything to uppercase after it's been entered and let the user type in
lowercase if he wants to.
Sorry, maybe I need to clarify further

I want to check to see if all entries are uppercase, (which is bad),
then convert to lowercase - mybad
Oct 2 '07 #4
In article <tZsMi.36360$nO3.15492@edtnps90>, an****@adjingo.com wrote:
>Doug Miller wrote:
>In article <UkjMi.36318$nO3.25338@edtnps90>, an****@adjingo.com wrote:
>>Hello

How would one auto validate using the 'onchange' method a text box for
invalid entries?

Invalid entries would include:

1. Input string of '....'
2. Input string of 'aaaa'
2. Check to see if all entries are uppercase

Insisting that the user type everything in uppercase is stupid. If it's
important to your application that all entries be in uppercase, then shift
everything to uppercase after it's been entered and let the user type in
lowercase if he wants to.

Sorry, maybe I need to clarify further

I want to check to see if all entries are uppercase, (which is bad),
then convert to lowercase - mybad
OK, fine.

Insisting that the user type everything in lowercase is stupid. If it's
important to your application that all entries be in lowercase, then shift
everything to lowercase after it's been entered and let the user type in
uppercase if he wants to.

Sheesh.

--
Regards,
Doug Miller (alphageek at milmac dot com)

It's time to throw all their damned tea in the harbor again.
Oct 2 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Scott Castillo | last post by:
Does anybody know how to auto-submit a form in PHP without Javascript? For instance, submit form variables to self, validate the data in PHP on same page, then, if no errors, auto-submit the data...
4
by: Alex Bell | last post by:
I am developing at http://www.members.iinet.net.au/~abell1/test/index.htm with city.css at http://www.members.iinet.net.au/~abell1/test/city.css. Both validate. In index.htm there is a block of...
11
by: csomberg | last post by:
SQL 2000 I thought I would throw this out there for some feedback from others. I'd like to know if you feel using MS auto-increment field is a good solution these days or should one grow their...
3
by: Jonathan | last post by:
Hi all: I originally posted this in an HTML forum, but have realized that the solution may (a) require a server-side change or (b) be non-existent. In any case, since the page I'm dealing with is...
5
by: Samuel | last post by:
Hi, I am running into a problem of mixing UICulture = auto and allowing users to select culture using a dropdown list. I am detecting a querystring, "setlang", and when found, setting the...
5
by: maya | last post by:
at work they decided to center divs thus: body {text-align:center} #content {width: 612px; text-align:left; margin: 0 auto 0 auto; } this works fine in IE & FF, EXCEPT in FF it doesn't work if...
11
by: vinceboy | last post by:
Hi..guys!I have a drop down menu with javascript null validation.However,instead of clicking submit button,it will immediately auto redirect after option was selected.Is it possible to prevent this...
24
by: Mike Hofer | last post by:
Please forgive the cross-post to multiple forums. I did it intentionally, but I *think* it was appropriate given the nature of my question. I'm working on an open source code library to help...
1
by: pravinnweb | last post by:
can anyone tell me how to set auto height to outer div that is in green box id "gray-background" it should increase relatively to inner div "smbox" here is the css and html code it should work in...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.