Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
23
rated 0 times [  28] [ 5]  / answers: 1 / hits: 49949  / 13 Years ago, fri, january 20, 2012, 12:00:00

I want to reset the form after calling an ajax function.
This is the code i gave in the jquery:



$(#frm_silder).reset();


Here frm_silder is the id of form. But when I'm using this code i got an eorror message like this.



$(#frm_silder).reset is not a function


In my html i give the id to form like this:



<form name=frm_silder id=frm_silder method=post>


So what is the problem in my code?


More From » jquery

 Answers
16

In jQuery



$('#frm_silder')[0].reset();


in Javascript



document.getElementById('frm_silder').reset()

[#87908] Wednesday, January 18, 2012, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
havenbilliec

Total Points: 324
Total Questions: 106
Total Answers: 94

Location: Pitcairn Islands
Member since Fri, Oct 15, 2021
3 Years ago
;