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

reset textboxes in previous values

I want javascript code in which ,,onclick on cancel button results, all form's textboxes will be reset in their previous values.? formname.reset() is not working ... :(
Dec 19 '11 #1
3 2151
I got the answer
Expand|Select|Wrap|Line Numbers
  1. <script>
  2. function resetform()
  3. {
  4. document.getElementById("formname").reset();
  5. }
  6. </script>
  7.  
now just call this function onclick event of Cancel button
Dec 19 '11 #2
acoder
16,027 Expert Mod 8TB
Why not just use a standard input reset button? Also consider the usability issues with reset buttons.
Dec 19 '11 #3
no,,i am using
<a href="#" class="negative" name="cancel" onclick="jacascript:reformset();" >
<img src="http://bytes.com/topic/javascript/images/cross.png" alt=""/>Cancel</a> Reset button is just button .here i am using image
Dec 20 '11 #4

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

Similar topics

0
by: TF | last post by:
Hi, Scenario: I have few TextBoxes on a WinForm, bound to a DataSet (using DataBindings collection). Initially only schema is filled in DataSet (using FillSchema() method), then a new row is...
5
by: \A_Michigan_User\ | last post by:
I'm using asp.net/vb.net/ado.net to create a very simple user interface. (Everything works if I use STATICALLY created textBoxes... but not when I make them DYNAMICALLY.) 1. Execute a SQL...
4
by: devi | last post by:
Hi, In oracle I have a LAG function using which I could get the previous value of a field. Do we have anything similar to that in SQL Server or access? Thanks Devi
2
by: Sheikko | last post by:
Hi, I have a class, cerated like a struc for some reasons, and I want to reset all values in it. public class MyClass { public byte Channel; public byte SatelliteID; public byte SyncFlags;...
1
by: Mob | last post by:
what is the best way to identify the current and previous values for form controls like text and checkbox in postback. Can this be done through viewstate ...
16
by: sreemati | last post by:
Hi everyone, This is the scenario: I have two button - Submit and Reset Submit is used for validation and after validation is passed it passes it to another form to enter into database. ...
1
by: dkhansoft | last post by:
hi, i have one feedback form, if user miss some fields and enter submit, then form has to display message and restore all previous values he entered i m able to display message bt not able...
3
by: artev | last post by:
if in a page I have a search form and I want use the method reset() for reinsert the default values, I notice that after a research, for the method reset(), the default values aren't more that...
2
by: helplakshmi | last post by:
Hi All, I am new to php. The form that i am designing has few input input fields with submit and reset button. The functionality of submit and reset are working properly till now. My form ...
0
by: Kevin Johnson | last post by:
Hi all, I'm relatively new to javascript, and have created a new form, which I adapted from the instructions 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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
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
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...
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.