How to POST these variables?
<p>The script called <em>New script</em> is suppose to output 2 integer variables <code>anchor</code> and <code>signed</code>.</p>

<p>I would like to replace <em>Old script</em> with <em>New script</em>, but as you can see, they are very different.</p>

<p><strong>Question</strong></p>

<p>How do I submit/post <code>anchor</code> and <code>signed</code> in <em>New script</em>?</p>

<p><strong>New script</strong></p>

<pre><code>$(window).load(function() {

    $('form').delegate('input:submit', 'click', function() {
        var anchor = this.name;
        var checkboxState = $('#' + anchor).find('input:checkbox').is(':checked');

        var signed = 0;
        if (checkboxState == true) {
            signed = 1;
        }

        alert(anchor + ' ' + signed);

        return false;
    });
});
</code></pre>

<p><strong>Old script</strong></p>

<pre><code>// sends the form content to server side, and stay on page
$('form').live('submit', function() {

    $.post($(this).attr('action'), $(this).serialize(), function(response) {
        // do something here on success
    }, 'json');

    // don't redirect
    return false;
});
</code></pre>

<p><strong>HTML</strong></p>

<pre><code>&lt;form action="/cgi-bin/receiver.pl" method="post"&gt;
</code></pre>
