Hi there,
You're getting there. With your code, you have the changed value. Now you just need the previous value. Try something like this:
$(document).ready(function() {
var currentVal = $('#status').val();
$('#status').change(function() {
var changedVal = $(this).val();
alert('You are changing status from ' + currentVal + ' to ' + changedVal);
currentVal = changedVal;
});
});
--Karl
____________
Karl Swedberg
On Jul 23, 2008, at 8:50 PM, issambres wrote:
Just starting to explore JQuery....
What I am trying to achieve is to compare previous value & selected
value of a drop down and then display a message. I am stuck as to how
I can retrieve previous value before the made the selection. Here is
what I got so far:
jQuery(document).ready(
jQuery("#status").change(function(){
alert(" You are changing status to :" + this.value);
});
})