473,804 Members | 3,067 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 6357
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.v alue == "....")

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.javas cript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Oct 2 '07 #2
In article <UkjMi.36318$nO 3.25338@edtnps9 0>, 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$nO 3.25338@edtnps9 0>, 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$nO 3.15492@edtnps9 0>, an****@adjingo. com wrote:
>Doug Miller wrote:
>In article <UkjMi.36318$nO 3.25338@edtnps9 0>, 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
29603
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 via post rather than URL. Could serialize a few fields to URL, but there is a larger comments field that I think needs to be posted instead. Auto-post the form variables possible? Thanks,
4
4610
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 text that I want to be centered and left justified. I have used this technique <p class="indent"> 11 Frederick Street<br /> Launceston<br />
11
2793
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 own ? Thanks, Me.
3
3765
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 a PHP page and the problem has to do with an auto-inserted "input" element, I'll post it here, too. I'd appreciate any advice, commentary, or even pessimistic sympathy if I'm just SOL. - Thanks. I am pasting some code below that I am having a...
5
5050
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 CurrentUICulture to what's specified in the querystring. Since I want to allow UICulture auto detecting, I add UICulture = "auto" to page directive on each page.
5
3282
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 I change 'auto' to 0 for left and right margin values; I have to leave those at 'auto'.. so I would like to know what exactly means 'auto' -- what value it represents exactly (and does it apply for all elements/values you might apply 'auto' to?)
11
2650
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 kind of fast respond? <select name="rNumber" title="number of ticket" onChange="GoToNextPage(this.value)"> <option selected>Select</option> <option>01</option> ...
24
2113
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 automate and clean up parameter validation code. It's almost ready to go into open beta. But one last little glitch is holding me up, and that would be the name of the factory class that serves as the entry point into the library: Validate.
1
5171
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 FF, IE6 and IE7 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE> Employee Listing </TITLE> <META NAME="Generator" CONTENT="EditPlus"> <META NAME="Author" CONTENT=""> <META NAME="Keywords"...
0
9706
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
10321
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10077
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9152
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7620
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5522
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4300
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3820
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2991
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.