以下の機能についてサポートが必要です。関数mainApp.php
は1を返しますが、ステートメントElse
の一部が実行されます。success IF
表現の正しさについて疑問がありますfunction(html,msg)
。この問題を解決する方法は?
更新(作業コード):
function click_function_ps() {
$.ajax({
url: 'callpage.php?page=optim/mainApp.php',
data: 'myParam='+$('#myParam').val(),
dataType: 'json',
success: function(output){
if(output.msg === 1){
$('#myContainer').html(output.html);
} else {
$dialog.dialog('open');
return false;
}
}
});
}
mainApp.php
$html_code = '<table width="100%">
<tr>
<td width="100%">
<div class="scrollbar" id="chart"><img class="displayed" src="ganttchart.php"></div>
</td>
</tr>
</table>';
echo json_encode(array('msg' => 1, 'html' => $html_code));