Putting data onto the POST array
I have been tearing my hair out with this for the past 12 or so hours and am no closer to a solution than when I began.
I have a jquery function to dynamically create <li> tags for an unordered list:
- $(function() {
- var idealist = $('#idealist');
- $('.checklist').click(function(event){
- item = '';
- $(idealist).empty('li');
- $('.selectitem').find(':checkbox').each(function(){
- if($(this).is(':checked')){
- var caption = $(this).parent().parent().parent().siblings('div.caption').html();
- var image = 'li#'+$(this).attr('value')+' img';
- var thumb = '<img id="idea-image-'+$(this).attr('value')
- + '" src="'+$(image).attr('src')
- + '" title="'+ caption + '" alt="'+ caption + '" width="20" height="20" />';
- idealist.append($('<li class="idealist-item"'
- + ' id="' + 'idealist-item-' + $(this).attr('value') + '">'
- + thumb + '<div>' + caption + '</div></li>'));
- }
- });
- });
- });
This is working fine. The problem is I need to somehow pull the ids from each <li> tag into a string or an array that can be made available somehow to php code for further processing. I can create the string or array within my jquery function but can't figure out how to make that available to php. Can anyone offer some suggestions?