Jquery Dialog Box

Jquery Dialog Box


Hi
I have some doubts in jquery UI dialog, i wrote the code like
below
1. In the form i have a link <a href="test.php" id="user">Link</a>
2. when i click the link, dialogbox will be opening.
3. there are two buttons in the dialog box OK,CANCEL
my doubt is when i click OK, dialog box will be close and page
redirects to test.php
if i click CANCEL, only dialog box will be close. pls clarify me
$(function() {
        $("#dialog").dialog({
            bgiframe: true,
            resizable: false,
            height:140,
            autoOpen: false,
            modal: true,
            overlay: {
                backgroundColor: '#000',
                opacity: 0.5
            },
            buttons: {
                Ok: function() {
                    $(this).dialog('close').remove();
                    alert(event.type);
    //return false;
                },
                Cancel: function() {
                    $(this).dialog('close');
                    return true;
                }
            }
        });
        $('#user').click(function() {
            $('#dialog').dialog('open');
            //return false;
        });
});