how to stop base page from reloading when using jquery dialog
<p>I've got the following code on my editRecords.php page. This page is a table of records and when I cick the view link it opens a dialog box with the displayRecord.php page in it. The problem is if I open the last record in the table instead of the dialog box opening/closing and the editRecords.php page remaining as is, it appears to reload which takes me back to the top of the page.</p>

<pre><code>$(document).ready(function() { 

     //creating a dialog box
     var dlg=$('#ticketDetails').dialog({
        title: 'Ticket Details',
        resizable: false,
        autoOpen:false,
        modal: true,
        hide: 'fade',
        width: 1300

     });

    //loading dialog box with record
    $('a.view').click(

    function(e) 
    {
         dlg.load('displayRecord.php?id='+this.id, function(){ 
         dlg.dialog('open');
         });

      });

});
</code></pre>

<p>I have tried using <code>e.preventDefault()</code> but this causes the dialog box to load with focus in the middle instead of the top.</p>

<pre><code>function(e) 
        {
                 //tested here e.preventDefault();
             dlg.load('displayRecord.php?id='+this.id, function(){ 
             dlg.dialog('open');
             });
         //tested here e.preventDefault();
</code></pre>

<p>How can fix/adjust this behaviour?</p>

<p>Thanks.</p>

<p><strong>CLARIFICATION:</strong> 
<code>e.preventDefault()</code> works but the problem is it causes the dialog to load with the focus in the middle. I have no problem opening or closing the dialog. I just want to stop the base page(editRecords.php) from reloading (or what appears to be like a page reload) so that when I close the dialog I see the record I clicked instead of having to scroll down again.</p>
