我正在处理如何向jquery 的 iframe 发布表单插件发送成功的响应。
借助插件演示的源码可以看到有如下代码:(点此查看源码)
complete : function (response)
{
var style,
width,
html = '';
if (!response.success)
// I've always came to this block! And that is exactly the problem that I have
{
$('.message').slideUp(function ()
{
$(this)
.html('There was a problem with the image you uploaded')
.css({
color : '#9c0006',
background : '#ffc7ce',
borderColor : '#9c0006'
})
.slideDown();
});
}
else /***** When is the response successful and when will code come here? *****/
{
/*
following code goes here...
*/
}
}
确切的问题是,什么时候response.success
会是真的?我应该如何TRUE
使用 PHP 设置它?(请回答有风格和没有JSON
风格)