Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: Submit & Reset


Message #1 by mahesh.kava@p... on Fri, 16 Feb 2001 22:13:27
i have a submit & a reset button on my form & the action of the asp page 

is the same page itself.when i am entering values in the text box,combo 

box etc and i click on reset button the values in the controls get clear.

but when i submit the form (i am submiting the same asp page) and after 

submission the values of the controls are retained as i am creating a 

filter search kind of page.now when i click the reset button ,the values 

(text) inside the controls do not seem to get clear.how do i clear the 

fields again( after submission)

any thoughts.

Message #2 by "Gerhard Wentink" <wentink@w...> on Sat, 17 Feb 2001 05:48:45 +0100
When you hit the reset button the fields are reset to the state they were in

when the page was loaded.

You can clear the boxes with javascript: Make a button and set the value of

the textbox to "" on the onClic-event.

Gerhard Wentink



----- Original Message -----

From: <mahesh.kava@p...>

To: "ASP Web HowTo" <asp_web_howto@p...>

Sent: Friday, February 16, 2001 10:13 PM

Subject: [asp_web_howto] Submit & Reset





> i have a submit & a reset button on my form & the action of the asp page

> is the same page itself.when i am entering values in the text box,combo

> box etc and i click on reset button the values in the controls get clear.

> but when i submit the form (i am submiting the same asp page) and after

> submission the values of the controls are retained as i am creating a

> filter search kind of page.now when i click the reset button ,the values

> (text) inside the controls do not seem to get clear.how do i clear the

> fields again( after submission)

> any thoughts.

>
Message #3 by "Alex Shiell, ITS, EC, SE" <alex.shiell@s...> on Mon, 19 Feb 2001 09:57:43 -0000
the reset button will reset the fields to whatever they contained when the

page was loaded.



So, if you pre-filled your fields like this



<INPUT TYPE="TEXT" NAME="FIELD1" VALUE="<%=request.form("FIELD1")%>">



they will revert back to the pre-filled values.



You have two options:



either 

keep the fields pre-filled and write a custom function (activated by a

button) that goes through each one and sets the value to blank.



or

write an onload function for the window that fills the fields in with the

submitted values once the window has loaded.





-----Original Message-----

From: mahesh.kava@p...

[mailto:mahesh.kava@p...]

Sent: Friday, February 16, 2001 10:13 PM

To: ASP Web HowTo

Subject: [asp_web_howto] Submit & Reset





i have a submit & a reset button on my form & the action of the asp page 

is the same page itself.when i am entering values in the text box,combo 

box etc and i click on reset button the values in the controls get clear.

but when i submit the form (i am submiting the same asp page) and after 

submission the values of the controls are retained as i am creating a 

filter search kind of page.now when i click the reset button ,the values 

(text) inside the controls do not seem to get clear.how do i clear the 

fields again( after submission)

any thoughts.



________________________________________________________________________

Scottish Enterprise Network

http://www.scottish-enterprise.com





Message #4 by mahesh.kava@p... on Tue, 20 Feb 2001 16:21:36
Thansk a lot alex & gerhand for all ur suggestions,i really appreaciate 

that.

as for the solution.i have writen a javascript function for clearing the 

fields.

  Return to Index