0

Hi,

I would like to know how to check the current value and the previous value entered by user before changes.

for example, the form will allow user to enter customer number. The first time user enter 10 then change to 22

customer number : 10 -> change to 22

how do I get the previous value which is 10 in this case

3
Contributors
2
Replies
3
Views
11 Years
Discussion Span
Last Post by zippee
0

Hi,

I would like to know how to check the current value and the previous value entered by user before changes.

for example, the form will allow user to enter customer number. The first time user enter 10 then change to 22

customer number : 10 -> change to 22

how do I get the previous value which is 10 in this case

try this:-

<input type="text" name="TxtBox" onFocus="javascript:var prevValue=document.formName.TxtBox.value;">

It may solve ur Problem.

0

If you trying to save both data in a database, you can use hidden form variable to store the previous data and the text field for the current data. When submitted, both value will be post to you.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.