post data to a thickbox using ajax
- by sqlchild
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
});
});