Pass value into dialog window in jQuery UI and to AJAX
<p>I have a number of items on a page that when clicked trigger UI's modal dialog. </p>

<pre><code>var $dialog = $("#dialog").dialog({ 
    autoOpen: false,
    resizable: false,
    modal: true 
});

$(".myLink").click(function(){
    $dialog.dialog("open");
    $("#dialog").dialog({
    var delURL = $(this).attr("href").split("#");
    var delID  = delURL[1]; 
        buttons: {
            "Delete": function() { 
                // need to add AJAX call here
                $.ajax({
                    type: "POST",
                    url: "some.php",
                    data: "delete=delID",
                    success: function(msg){
                        alert( "Deleted: " + msg );
                    }
     });
                $(this).dialog("close"); 
            }, 
            "Cancel": function() { 
                $(this).dialog("close"); 
            } 
        }
    });
});
</code></pre>

<p>I need to pass anchor value to another page when "Delete" button is clicked. I thini I need to use AJAX.</p>

<pre><code>&lt;a href="#val_1" class="myLink"&gt;Value 1&lt;/a&gt;
&lt;a href="#val_2" class="myLink"&gt;Value 2&lt;/a&gt;
&lt;a href="#val_3" class="myLink"&gt;Value 3&lt;/a&gt;
</code></pre>

<p>Not sure how to do it.</p>
