I am currently compiling a page on which I have a list of 15 images of staff. I am trying to configure this so that when the user freezes over the image, the div in the upper right corner updates the information requested from the MySql database. For example, a network user hovered over the image of Personnel No. 112 → Div Updates to include height, weight, location and position from mysql without updating. I researched for a while, but I can only find how to do this with Ajax, Php, JQuery and the form element. Any help, tutorials or information would be very helpful. Thank you
UPDATE
I ended up changing the part of the code that was provided and the final version:
<script type="text/javascript">
$('.staff_hover').on('click', function(){
id = $(this).attr('id');
$.post('staff_php.php',{id: id}, function(data) { var obj = jQuery.parseJSON(data);
var staffnum = obj.staffnum;
var height = obj.height;
var eye = obj.eye;
var hair = obj.hair;
var abt1 = obj.abt1;
var abt2 = obj.abt2; alert(obj.height);
$('#staff_info').html('<b>STAFF #</b>: ' + staffnum + ' <br /><b>HEIGHT</b>: ' + height + ' <br /><b>EYE COLOR</b>: ' + eye + '<br /> <b>HAIR COLOR</b>: ' + hair + '<br /><b>ABOUT</b>:<br /> <b>-</b> ' + abt1 + '<br/><b>-</b> ' + abt2);
});
}); </script>