| | |
Problem with resetting value in form!
Please support our ASP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Jun 2008
Posts: 89
Reputation:
Solved Threads: 7
Hi,
I need to reset all the values of elements in my form to empty string. But the problem is that the form can be reset but the variable still holding the value of y previous input.
For exp,
Input 5 value at first time.
Input 2 value at second time. The rest of the 3 field will take the input value I input previously.
Here my reset function:
Help!
I need to reset all the values of elements in my form to empty string. But the problem is that the form can be reset but the variable still holding the value of y previous input.
For exp,
Input 5 value at first time.
Input 2 value at second time. The rest of the 3 field will take the input value I input previously.
Here my reset function:
ASP Syntax (Toggle Plain Text)
function resetForm(formId) { var form, elements, elm; if(document.getElementById) form = document.getElementById(formId) else form = document.forms[formId]; form.reset(); elements = form.elements /** * Clear default text of text elements */ for( i=0, elm; elm=elements[i++]; ) { if (elm.type == "text") { elm.value =''; } } }
Help!
![]() |
Similar Threads
- Saw this a while back - so thought I'd post it lol (IT Professionals' Lounge)
- memory management in wndows 2000 (Windows NT / 2000 / XP)
- A C++ CGI Problem (C++)
- Geeky Humor (Geeks' Lounge)
- Web development help please, this is baffling the crap out of me (PHP)
- Linksys wireless G - periodic resetting? (Networking Hardware Configuration)
Other Threads in the ASP Forum
- Previous Thread: MSSQL 2000 COnnect,Retreive, Delete
- Next Thread: Reading xls without uploading on server
| Thread Tools | Search this Thread |
archive asp asp.net aspandmssqlserver2005 aspandmssqlserver2005connection aspconnection connection database databaseconnection dreamweaver excel fso iis msmsql mssql2005 mssqlserver2005 mssqlserver2005andasp mssqlserverandasp opentextfile record searchbox selectoption single specfic sqlserver sqlserverconnection windows7





