.load(function()) not working...

.load(function()) not working...


I've got a web app that has a jqGrid in it. The loadComplete callback
function has a piece that attaches a click event to the cell of an
order line if that line has notes. The click event is getting there
fine but what I want to do is load the notes in a jquery modal
dialog. So here is what I tried, but the .load() doesn't seem to work
and I was wondering if there is something blazingly obvious that I'm
doing wrong...
htmlcell.click(function(){
    $("#lnTable").html("<table id='lNotes' class='scroll' cellpadding='0'
cellspacing='0'></table>");
        var line=$(this).html();
        $('#lineNotes').dialog("open").load(function(){
            $('#lNotes').jqGrid({
                url: "LineNotesGrid?line="+line,
                datatype: "json",
                height: 300,
                colNames:['Notes'],
                colModel: [{name:'note',index:'notes',width:
400,align:"left",sortable:false}],
                imgpath:"images",
                viewrecords:true,
                loadonce: true,
                width:480,
                multiselect:false,
                shrinkToFit: true,
                jsonReader: {repeatitems : false}
            });
        });
    });
The modal opens, but when I debug in firebug it never goes inside the
load function....and I can't figure out why.