Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: INPUT Type="Reset"


Message #1 by "Rita Greenberg" <rg1@h...> on Tue, 27 Mar 2001 17:42:08
Hi.



I have a form with 2 list boxes. List box1 is populated with rows from a 

table. The user can select options from list box1 and have them added to 

list box2. They can also remove options from list box2 back to list box1.



I have a reset button on the form but when I click on it, the list boxes 

are not reset. For the heck of it, I added a text input object and that 

was reset when I clicked on the reset button.



Other than repopulating list box1 with the record set and clearing out 

list box2, is there something I'm missing regarding resetting the 2 list 

boxes?



TIA.



Rita
Message #2 by "Alex Shiell, ITS, EC, SE" <alex.shiell@s...> on Wed, 28 Mar 2001 09:48:49 +0100
All that Reset does is set the fields back to the values that they had when

the page was loaded initially.



So if a text field is defined like this



<INPUT TYPE="TEXT" VALUE="Some Text">



and you type something else into the field, and then hit Reset, the field

will contain the text "Some Text" again.  Likewise if it was empty to begin

with, then it is cleared by the Reset button.



For drop-downs, if an item was selected initially (With <OPTION SELECTED>,

then when you hit reset, that item is selected again.  Likewise if no item

was selected, whatever item is now selected will be deselected.



So basically if you want the reset button to remove the options that were

added at run time, you will need to write your own code that will remove

these items, and clear the other fields.



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

From: Rita Greenberg [mailto:rg1@h...]

Sent: Tuesday, March 27, 2001 6:42 PM

To: ASP Web HowTo

Subject: [asp_web_howto] INPUT Type="Reset"





Hi.



I have a form with 2 list boxes. List box1 is populated with rows from a 

table. The user can select options from list box1 and have them added to 

list box2. They can also remove options from list box2 back to list box1.



I have a reset button on the form but when I click on it, the list boxes 

are not reset. For the heck of it, I added a text input object and that 

was reset when I clicked on the reset button.



Other than repopulating list box1 with the record set and clearing out 

list box2, is there something I'm missing regarding resetting the 2 list 

boxes?



TIA.



Rita

________________________________________________________________________

Scottish Enterprise Network

http://www.scottish-enterprise.com

Message #3 by Rita Greenberg <rg1@h...> on Wed, 28 Mar 2001 07:26:44 -0800
Hi Alex.



Thanks for that great explanation. I did land up writing my own code.



Rita



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

From: Alex Shiell, ITS, EC, SE [mailto:alex.shiell@s...]

Sent: Wednesday, March 28, 2001 12:49 AM

To: ASP Web HowTo

Subject: [asp_web_howto] RE: INPUT Type="Reset"





All that Reset does is set the fields back to the values that they had when

the page was loaded initially.



So if a text field is defined like this



<INPUT TYPE="TEXT" VALUE="Some Text">



and you type something else into the field, and then hit Reset, the field

will contain the text "Some Text" again.  Likewise if it was empty to begin

with, then it is cleared by the Reset button.



For drop-downs, if an item was selected initially (With <OPTION SELECTED>,

then when you hit reset, that item is selected again.  Likewise if no item

was selected, whatever item is now selected will be deselected.



So basically if you want the reset button to remove the options that were

added at run time, you will need to write your own code that will remove

these items, and clear the other fields.



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

From: Rita Greenberg [mailto:rg1@h...]

Sent: Tuesday, March 27, 2001 6:42 PM

To: ASP Web HowTo

Subject: [asp_web_howto] INPUT Type="Reset"





Hi.



I have a form with 2 list boxes. List box1 is populated with rows from a 

table. The user can select options from list box1 and have them added to 

list box2. They can also remove options from list box2 back to list box1.



I have a reset button on the form but when I click on it, the list boxes 

are not reset. For the heck of it, I added a text input object and that 

was reset when I clicked on the reset button.



Other than repopulating list box1 with the record set and clearing out 

list box2, is there something I'm missing regarding resetting the 2 list 

boxes?



TIA.



Rita




  Return to Index