473,394 Members | 1,829 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,394 software developers and data experts.

reset button code not working

Turn off validation message when form is "Reset"

I have a "Reset" button that when clicked, deselects an item on the grid and clears the populated input fields. But when I try replacing the values on the input field with a null value,it automatically turns on the validation and there is a "This field is required" message. How can I disable that validation check when the user clicks "Reset"?
Feb 25 '12 #1
1 1842
Rabbit
12,516 Expert Mod 8TB
Set a state variable when the reset button is clicked and then validate only when that state variable is not set. Don't forget to unset the variable after you're done.
Feb 26 '12 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Matt | last post by:
i need to implement a clear button to clear all the fields in the form, but i am thinking i can just use reset button. <input type="reset" name="reset" value="CLEAR"> The first thought is...
4
by: Chris Lane | last post by:
Hi, I have an HTML RESET button and Web Control Button that posts back to the server. Problem is the reset button doesn't work after the postback occurs. Any ideas or suggestions as to why this...
1
by: John | last post by:
Hi What is the vb code that will reset a webform? Thanks Regards
1
by: NancyASAP | last post by:
Thought I'd share this since it took me a long time to get it working. Thanks to a bunch of contributers in Google Groups who shared javascript, etc. The question was: How can I put a reset...
7
by: Kermit Piper | last post by:
Hello, How can you clear session variables when a reset button is pressed? I thought I might be able to do something like: <% If request.form("Reset") = "Reset" then Session("variable") =...
3
by: kashif_khan | last post by:
hi everyone, can anybody please tell me why reset button is not working in the following code, i tested it in opera, firefox and konqueror, <form action='edit_links.php' method='POST'...
22
by: tomb | last post by:
I am generating a form dynamically through AJAX. The form and the data come in very nicely, but my reset button doesn't do anything. There are 3 other buttons that call javascript functions - they...
4
by: tomb | last post by:
Hi, can someone make sense of this? I am using AJAX to populate a <div>, which is working very nicely, except for one thing: My reset button in the resulting <formis dead. When I put a...
2
by: megNAG | last post by:
hi.........i am designing front end for a website using dreamweaver tool.I've dragged the button for reset but i dont know how reset button will clear all the text.can you please tell me the java...
1
by: anthriksh200 | last post by:
Hello, I have perl -cgi script in which we have used the javascript . In this the " resret" button is there which should reset the form defaut values (interms of drop down and then reload the ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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,...
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
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...

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.