473,666 Members | 2,678 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

validation on a textfield value

I want to do validation on a textfield value key in by user, but I do not
have idea on what method I can use. Is it possible to do it on 'onblur'
event?

Please give some ideas or useful links about this.

Thanks.

Mar 2 '06 #1
2 1433
juicy said the following on 3/1/2006 8:58 PM:
I want to do validation on a textfield value key in by user, but I do not
have idea on what method I can use. Is it possible to do it on 'onblur'
event?
Don't use onblur, use the onchange event handler.
Please give some ideas or useful links about this.


http://www.JavascriptToolbox.com/bestpractices/
http://jibbering.com/faq
--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Mar 2 '06 #2
JRS: In article <a1************ *************** ***@localhost.t alkaboutpr
ogramming.com>, dated Wed, 1 Mar 2006 20:58:39 remote, seen in
news:comp.lang. javascript, juicy <ju*******@nosp am.yahoo.com> posted :
I want to do validation on a textfield value key in by user, but I do not
have idea on what method I can use. Is it possible to do it on 'onblur'
event?
Yes; but often unwise.
Please give some ideas or useful links about this.


<URL:http://www.merlyn.demo n.co.uk/js-valid.htm> ?

--
© John Stockton, Surrey, UK. ?@merlyn.demon. co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.c om/faq/> JL/RC: FAQ of news:comp.lang. javascript
<URL:http://www.merlyn.demo n.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demo n.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Mar 3 '06 #3

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

Similar topics

10
3584
by: Steve Benson | last post by:
Our regular programmer moved on. I'm almost clueless in Javascript/ASP and got the job of adapting existing code. In the page below, everything works until I added the function checkIt() to validate which radio button was clicked and what was in a textfield. The form is an attendance checking page for a cyber charter school. What I'm trying to accomplish is that if a parent marks the student present, there should not be anything in the...
2
1111
by: Soul | last post by:
Hi, I have .aspx page code in C#, which contain a sample registration form. There are help Button controls beside all fields, when user click on the help button, there will be an explanation text display in a Label control. There is a also a submit Button control at the bottom of the page for user to submit the registration form. Both Button controls are calling different fucntion. There are some RequiredFieldValidator controls...
5
1623
by: jdserran | last post by:
i need help, this is my code for my form: print header; print start_html('Assignment 2'), start_form(-action=>'lwpmsample.pl',-method=>'POST'), "Option: ", popup_menu(-name=>'myOption', -values=>), p, "URL of page to be changed: ", textfield(-name=>'urlToBeChanged',
1
1444
by: runway27 | last post by:
i have a registration page where a user fills up a form such as username, first name, phone number etc. i need to do a validation for the following fields. any help will be greatly appreciated. 1. for a text field if for example a user hits the space bar and then types the information with the validation i have the code ignores those initial spaces but actually these are spaces i need to insert these values in a database so these spaces...
3
304
by: sanju | last post by:
Dear All, i have 10 textboxes on a form, I require the following validation 1) if i fill the textbox in between(say 5th), then all textboxes before that should be mandatory,ie Textboxes(1,2,3,4) should be mandatory and rest of the textboxes should not be mandatory. Kindly help me out..
2
1360
by: sukatoa | last post by:
I am a newbie on JavaScript.... I would like to know about what's wrong in my code below: <html> <head> <title>Text Example</title> </head> <body>
1
1507
by: lijiunni | last post by:
how will i validate textfield in jsp using javascript..........and also i have to set focus back to textfield if the validation result is wrong......i need an example coding
4
3019
by: pureadrenaline | last post by:
Hey Guys, Please could anyone help me out with the following form I need to create a validation on the email field only if the user checked the radio button named Email. Thanks in advance. <form action="" method="get"> <div align="center"> <table border="0" cellspacing="0" cellpadding="0">
2
5789
by: MRamaLakshmi | last post by:
Hi, Do any body have validation script for a textfield which is a percentage field where i should be able to enter values between 0.0 to 100.0 if user tries to enter any other value it should not accept.It should not even allow the user to enter. I am in a urgent requirement. Please any body help me out from this. Thanks,
0
8438
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...
0
8863
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8549
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
8636
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...
1
6187
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
5660
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2765
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
2004
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1761
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.