By: william
Date: 2010-06-25
Time: 15:42
|
problem with AJAX
I am trying to create an OO document from a script that is invoked via AJAX.
When running stand-alone, it works fine. When invoked via AJAX some output ends up in the DIV and no document is created. The stuff in the DIV starts with:
PK����"X�<^�2'���'������mimetypeapplication/vnd.oasis.opendocument.textPK��
|
and ends with
Configurations2/toolbar/PK �����"X�<�������������������������� ��Configurations2/images/Bitmaps/PK ���"X�<�J}ĵ��)T�����������������content.xmlPK ����"X�<��O������������������� ��manifest.rdfPK ���"X�<΋�d@ ��5�� �������������)��styles.xmlPK �����"X�<�.J����������������������meta.xmlPK ���"X�<�p�U �������������������.��META-INF/manifest.xmlPK������(��_0����
|
Anyone have any thoughts or suggestions ?
I am puzzled.
bill
|
By: william
Date: 2010-06-25
Time: 15:48
|
Re: problem with AJAX
Addendum:
After merging I show with this statement:
$file_name = "test.odt";
// Output as a download file (some automatic fields are merged here)
$TBS->Show(OPENTBS_DOWNLOAD+TBS_EXIT, $file_name);
|
bill
|
By: Skrol29
Date: 2010-06-25
Time: 17:13
|
Re: problem with AJAX
Hi Bill,
When you do an HTTP download, an HTTP header is send before the binary contents in order to info the bowser that the arriving content is a download. But when you are using the Ajax functions, the HTTP header is superfluous, only the content is transfered. And that what Ajax is for.
So I don't believe you'll succeed in perform an HTTP download with Ajax.
|
By: william
Date: 2010-06-25
Time: 21:03
|
Re: problem with AJAX
Thanks, I fear you are correct, but I was hoping there was some magic.
I guess I will just pop open a new window instead of using AJAX for this function.
I continue to appreciate the rapid responses with the help and love TBS.
bill
|
|
Posting in progress.
Please wait...
|