|
[x]
Posted via EE Mobile
|
|
| Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
|
|
|
|
Asked by jamie_2008 in PHP Scripting Language, Jquery, Asynchronous Javascript and XML (AJAX)
hi ,
i m creating a zip file of bunch of files . i m sending request via ajax by using jquery . but zip file gives output of few of ascii characters . it doesn't generate the zip file . but when i test it separately . it works fine . but not with ajax .
looking forward
Thanks
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
|
$zipfile = new Ziplib;
$zipfile->zl_add_file($stringData,$_REQUEST['filename'],"g9");
header("Content-type: application/zip");
header("Content-Disposition: attachment; filename=\"testfile.zip\"");
echo $zipfile->zl_pack("zip file comments");
this is jquery code
$.ajax({
url:'create_page.php',
type:'POST',
data:'header=' + $('#p_header').val() + '&filename=' + $('#p_filename').val() + '&footer=' + $('#p_footer').val() + '&path=' + $('#p_path').val() + '&page_view=' + $('input[name=page_way]:checked').val() + '&tut_values=' + checkSegmentStatus2,
success:function(results)
{
$('#loading_img').remove();
alert('Your page has been created!');
alert(results);
// $('#loading_div').append('<img src="images/loading.gif" alt="Generating the demos page ..." id="loading_img" />');
}
|
20091111-EE-VQP-89 - Hierarchy / EE_QW_3_20080625