473,394 Members | 2,048 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 values on a webform

Hi group,

I have a waebform to send emails.
On the form there are 2 buttons: A button "send" and a button "reset".

If I click aon the button my email is send, but I want to reset the values
on my form (to send another email).

How can I do that. ?

thx in advance !

gr

Bernie V
Nov 17 '05 #1
5 1368
Hi
If I click aon the button my email is send, but I want to reset the values
on my form (to send another email).


You can use a ResetButton:
<INPUT type="reset" value="Reset">

Hi
Giorgio

Nov 17 '05 #2

"Giorgio Parmeggiani" <gi******@gipadotnet.com> schreef in bericht
news:u0*************@TK2MSFTNGP11.phx.gbl...
Hi
If I click aon the button my email is send, but I want to reset the values on my form (to send another email).


You can use a ResetButton:
<INPUT type="reset" value="Reset">

Hi
Giorgio


thx for the tip, bit is it also possible with code in stead of a button ?

thx in advance,

gr

Bernie V
Nov 17 '05 #3
Hi Bernie
You can use a ResetButton:
<INPUT type="reset" value="Reset">

thx for the tip, bit is it also possible with code in stead of a button ?


Yes you can reset your form using Javascript client code, here an example:

in the HTML page
<script language=javascript>
function reset()
{
document.forms[0].email.value="";
..........
document.forms[0].cc = "";
}
</script>

in the codebehind(at example in the Page_Load event):

this.Button1.Attributes.Add("OnClick", "java" + "script:Reset();");

Giorgio
Nov 17 '05 #4

"Giorgio Parmeggiani" <gi******@gipadotnet.com> schreef in bericht
news:u1**************@TK2MSFTNGP12.phx.gbl...
Hi Bernie
You can use a ResetButton:
<INPUT type="reset" value="Reset">

thx for the tip, bit is it also possible with code in stead of a button ?


Yes you can reset your form using Javascript client code, here an example:

in the HTML page
<script language=javascript>
function reset()
{
document.forms[0].email.value="";
..........
document.forms[0].cc = "";
}
</script>

in the codebehind(at example in the Page_Load event):

this.Button1.Attributes.Add("OnClick", "java" + "script:Reset();");

Giorgio


thx a lot !!
Bernie V
Nov 17 '05 #5
Another way to do it is:

document.forms[0].reset();


On Sat, 1 Nov 2003 22:54:27 +0100, "Giorgio Parmeggiani"
<gi******@gipadotnet.com> wrotC:
Hi Bernie
> You can use a ResetButton:
> <INPUT type="reset" value="Reset">
>

thx for the tip, bit is it also possible with code in stead of a button ?


Yes you can reset your form using Javascript client code, here an example:

in the HTML page
<script language=javascript>
function reset()
{
document.forms[0].email.value="";
..........
document.forms[0].cc = "";
}
</script>

in the codebehind(at example in the Page_Load event):

this.Button1.Attributes.Add("OnClick", "java" + "script:Reset();");

Giorgio


Nov 17 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Ken | last post by:
How can I reset the initial form variables that are set with session statements when clicking on a button? I tried this but the function was not called: <?PHP function reset_form($none) {...
2
by: Charles M. Fish, Sr. | last post by:
I’m so tired from banging this problem around all day, I hope I can explain it succinctly & accurately. I want to execute a function immediately following a click on <input type="RESET"... ...
9
by: YoBro | last post by:
Hi, Is this possible, if so how would you go about it. I have a reasonably large form that includes 6 file input fields. I wanted to create an option to allow the user to reset only the file...
1
by: John | last post by:
Hi What is the vb code that will reset a webform? Thanks Regards
2
by: Lance | last post by:
I want to be able to reset a complex property in a PropertyGrid. I know that for properties that are ValueTypes you can include System.ComponentModel.DefaultValue in the declaration of the property....
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;...
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. ...
16
by: Giovanni D'Ascola | last post by:
Hi. I noticed that <input type="reset"actually don't enable checkbutton which are checked by default after they have been disabled by javascript. It's a bug?
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...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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...

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.