ZoniacUser
asked on
Compare data change during form resubmission
When a HTML page the page is closed, we need to alert saying
Is there JQuery built in method to know whether the form data is changed.
or need to follow a complex way,
1. Introduce a local java script variable and capture all the form data in onload event.
2. While Close the window, Compare the local java script variables and form input values, if there is a change alert.
"There are some data changed which is not saved, do you want to close?"
Is there JQuery built in method to know whether the form data is changed.
or need to follow a complex way,
1. Introduce a local java script variable and capture all the form data in onload event.
2. While Close the window, Compare the local java script variables and form input values, if there is a change alert.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
What do you mean you 'don't want'. You asked a question, and you got some answers. It's considered bad manners to just delete the question, without ever interacting with the Experts that tried to help you!!
ASKER
This was done by mistake, we apologize for this.
ASKER
We were waiting for a better solution, Both solution given works great.
But in here we are trying to say.
Ex.,
1. Say you have a page, which has a text field
2. The Text field is populated as "Java Developer" while page is loaded
3. The user removes the Java Developer and again types Java Developer
4. According to code the field is changed
5. But According to user the form is not changed.
We just want to know whether there is any built in solution for this in JQuery or to follow the traditional way (What we have done now)
1. Introduce a local java script variable and capture all the form data in onload event.
2. While Close the window, Compare the local java script variables and form input values, if there is a change alert.
But in here we are trying to say.
Ex.,
1. Say you have a page, which has a text field
2. The Text field is populated as "Java Developer" while page is loaded
3. The user removes the Java Developer and again types Java Developer
4. According to code the field is changed
5. But According to user the form is not changed.
We just want to know whether there is any built in solution for this in JQuery or to follow the traditional way (What we have done now)
1. Introduce a local java script variable and capture all the form data in onload event.
2. While Close the window, Compare the local java script variables and form input values, if there is a change alert.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I dont want