I'm building a message center. From their inbox, my users can select multiple checkboxes, click the "Delete" button, and selected messages are removed. Works great:
html:
<input type="submit" id="DeleteButton" value="Delete" />
script:
 $('#DeleteButton').click (function() {
 var selected = new Array();
 $("input:checkbox[name=message]:checked").each(function() {
 selected.push($(this).val());
 });
 var selectedString = selected.join(",");
        <cfoutput>$.post("SecComm.cfc?method=deleteMessages&recipientID=#session.ID#", {selected: selected },</cfoutput>
        function(html) {
                        loadMessages();
        });  
    });
The problem I'm having is where I allow users to move messages to any folders they may have set up. I'm using similar script but cannot get it working with the href:
<div class="moveMessages"> 
        <a href="" class="move"  id="7">My new folder</a>
</div>
script:
$('.move').click(function(){ 
 var folderID = $(this).attr('id');                                
 var selected = new Array();
 $("input:checkbox[name=message]:checked").each(function() {
  selected.push($(this).val());
 });
        $.post(
            "SecComm.cfc?method=moveMessage&recipientID=#session.ID#", 
            {messageID: selected },
            {folderID: folderID },
            function() {
                loadMessages();
            });         
    });
I'm sure I'm missing something obvious. Thanks so much for the help.
 
     
     
     
     
     
    