スクリプトが ajax 関数によって呼び出されると、Joomla 2.5 の次の行で PHP スクリプトが中止されます。
JResponse::setHeader( 'Content-Disposition', 'attachment; filename="example.json"' );
ajax呼び出しは次のとおりです
jQuery.ajax({
data: 'groupid='+group_id,
type: 'post',
url: "/index.php?option=com_example&view=default&format=json",
success: function(data) {
if (0 == data)
addFormField(format_date);
else {
data_calculator = data;
jQuery(document).ready(function() {
initFields();
});
}
},
error: function(jqXHR, textStatus, errorThrown) {}
});
Joomla 1.6 ではまだ動作していました。また、PHP 関数 header(...) でヘッダーを設定すると、同じエラーが発生します。何がうまくいかないのですか?