Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Saving value from Select tag

Status
Not open for further replies.

getjbb

MIS
Jun 4, 2003
139
US
Is there anyway I can hold an old value and switch it with what the user is selecting, when they hit save, or revert back to the old value.

Right now if I try to save I get the error that only one value can be saved at a time, into the table field. During the save I think the new value is attempting to populate the field when the old value exists there already.

Someway I need to clear out the old value before populating with the new. I am trying to prevent revsing a difficult save procedure and was wondering if there is someway I can manipulate this in a javascript before hitting save.

For example if I had the following select statement:

<select>
<option> <selected>PHP</option>
<option>ASP</option>
<option>NET</option>
</select>

If PHP is the selected value, is there some way to hold it somehow as previous value. And as the user is clicking between the other values(ASP, NET) the old value(PHP) value is maybe cleared out until the final selection is made and save is hit.

Thanks
getjbb
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top