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

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.

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.