Passing Value to Javascript function
<p>I'm calling a jQuery function, but the alert function displays [object Object]. The check value works, but not the passed id value.</p>

<p>Here's the call to the function taken from the html output:</p>

<pre><code>&lt;td class="myGroups"&gt;
    &lt;input class="chkSubscribed" type="checkbox" onclick="UpdateSubscription(2)" name="subscribed"&gt;
&lt;/td&gt;
</code></pre>

<p>Here's the javascsript function:</p>

<pre><code>$(".chkSubscribed").change(function(id) {
    alert(id);
    var chkd=0;
    var groupid=id;
    if (this.checked) { chkd=1; }
        $.ajax({
        type:"POST",
        url:"resources/updateSubscribe.php",
        data: { group_id: groupid, checkval: chkd },
        success: function(){
        alert("Account updated!" + "chkval=" + chkd + " id=" + groupid);                }
    });
});
</code></pre>

<p>Thanks for any help!</p>
