![]() |
|
|
|
#1 |
|
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 Bernie V |
|
|
|
|
#2 |
|
Posts: n/a
|
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 |
|
|
|
#3 |
|
Posts: n/a
|
"Giorgio Parmeggiani" <> schreef in bericht news:... > 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 |
|
|
|
#4 |
|
Posts: n/a
|
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 |
|
|
|
#5 |
|
Posts: n/a
|
"Giorgio Parmeggiani" <> schreef in bericht news:... > 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 |
|
|
|
#6 |
|
Posts: n/a
|
Another way to do it is:
document.forms[0].reset(); On Sat, 1 Nov 2003 22:54:27 +0100, "Giorgio Parmeggiani" <> 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 > |
|