post data to a thickbox using ajax

Posted by sqlchild on Stack Overflow See other posts from Stack Overflow or by sqlchild
Published on 2012-10-27T10:57:12Z Indexed on 2012/10/27 11:00 UTC
Read the original article Hit count: 270

Filed under:
|
|
|
|

I need to post data to a thickbox using ajax and open it immediately and display the posted data. The user would click on a link/button and the data i.e. value of the selected checkboxes would be posted to "my_thickbox.php" and the thickbox (url : my_thickbox.php) would open with checkbox values displayed.

<div id="showthickbox" ><a href="my_thickbox.php" class="thickbox"></div>


        $('#showthickbox').click(function()

        {


            var data = $('input:checkbox:checked').map(function()   {

                                return this.value;
}).get();




                        $.ajax({
                                      type: 'POST',
                                      url: 'my_thickbox.php',
                                      data: data,
                                      success: success,
                                      dataType: dataType
                                });                                                         


        });

© Stack Overflow or respective owner

Related posts about php

Related posts about jQuery