By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,520 Members | 1,246 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,520 IT Pros & Developers. It's quick & easy.

reset textboxes in previous values

P: 4
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
Share this Question
Share on Google+
3 Replies

P: 4
I got the answer
Expand|Select|Wrap|Line Numbers
  1. <script>
  2. function resetform()
  3. {
  4. document.getElementById("formname").reset();
  5. }
  6. </script>
now just call this function onclick event of Cancel button
Dec 19 '11 #2

Expert Mod 15k+
P: 16,027
Why not just use a standard input reset button? Also consider the usability issues with reset buttons.
Dec 19 '11 #3

P: 4
no,,i am using
<a href="#" class="negative" name="cancel" onclick="jacascript:reformset();" >
<img src="" alt=""/>Cancel</a> Reset button is just button .here i am using image
Dec 20 '11 #4

Post your reply

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