I can't figure out why this is alerting me several times for each change...
$(function(){
$("#shift_name_<?php print $shift_id;?>").change(function () {
$(".alertmessage").load("messages.php?eid="+$("#shift_name_<?php print $shift_id;?>").val(), function(data<?php print $shift_id;?>) {
if(data<?php print $shift_id;?>!=''){
alert(data<?php print $shift_id;?>);
}
});
});
});
Basically, there are a few that are looped through and given specific ids based on a php variable. However, when I change one it alerts me x number of times where x is the number of exist on the page...