jQuery - Why isnt my POST firing?
<pre><code>var htmlGeneratedContent = '&lt;td align="right"&gt;&lt;input type="button" value="Save Comment" class="button" onClick="' +               
'submitToServer(' + key + ',' + userID + ',' + batchID + ')' + 
</code></pre>

<p>The code above generates HTML visible in firebug as</p>

<pre><code>&lt;input type="button" onclick="submitToServer(1111,bmackey,2222);deActivateThat();" class="button" value="Save Comment"&gt;
</code></pre>

<p>But when I click my function does not fire</p>

<pre><code>    function submitToServer(key, userID, batchID) {
        $.post("savePage.aspx",//breakpoint never hit
            { key: key, userID: userID, batchID: batchID }
        );
    }
</code></pre>

<p>I tried wrapping my generated string to produce <code>submitToServer('1111','bmackey','2222')</code>. bit the code </p>

<pre><code>'submitToServer(\"' + key + '\",\"' + userID + '\",\"' + batchID + '\")' + 
</code></pre>

<p>ended up generating the HTML wrong.  </p>

<pre><code>&lt;input type="button" );deactivatethat();="" 2222="" ,="" bmackey="" 1111="" onclick="submitToServer(" class="button" value="Save Comment"&gt;
</code></pre>
