これが問題の解決策でした
$('img.imagepopupcontext').hover(function (e) {
// Begin mouseover function
// Grab the p tag with the id of 'dbInfo' in order
// to retrieve information from it later
var cvalue = $(this).parent().parent().attr('id'); //tr.innerGridRow parent
count++;
//$('#ctl00_ContentPlaceHolder1_txtcontextkey').val(cvalue);
//$('#ctl00_ContentPlaceHolder1_btnmodalclick').click();
// var img = $(this);
$.ajax({url:'callbackdynamicdata.aspx',context:this,data:({ ID: cvalue}),success:
function(data){
var html = '<div id="infopathpanel">';
html += data;
html += '</div>';
// Append the variable to the body and the select
// itself and its children and hide them, so you
// can then add a fadeIn effect.
$('body')
.append(html)
.children('#infopathpanel')
.hide()
.fadeIn(400);
// This is where the popup offesets away from your cursor
// The variables set up top will decide how far away the
// pop up strays away from your cursor.
var pos = $(this).offset();
$('#infopathpanel').css({
position: "absolute",
top: (pos.top - 170) + "px",
left: (pos.left - 310) + "px",
'background-color': '#ffffcc',
'width': '300px',
'border-color': '#060F40',
'border-width': '2px',
'color': '#060F40'
});
}})