我提交图片传不到后台,试过网上写的方法结果也是一样,干脆用框架里的写法贴上来求博友帮帮忙看下
jsp页面:
Insert title hereUserinfo userinfo = (Userinfo) ActionContext.getContext()
.getSession().get("userinfo");
String username = userinfo.getUsername();//取出登陆用户名
%>
function publishNow(){
var username = "";
document.getElementById("form").action = "propertyPublishNotice?username="+username;
document.getElementById("form").submit();
}
function publishDelay(){
var username = "";
document.getElementById("form").action = "propertyDelayPublishNotice?username="+username;
document.getElementById("form").submit();
}
οnsubmit="return iframeCallback(this);">
id="title" name="noticetitle" placeholder="公告标题"
style="width: 400px;">
style="width: 700px; height: 300px; line-height: 20px;"
placeholder="公告正文" name="noticeContent">
/*
下面是上传域
*/
uploaderOption="{
swf:'uploadify/scripts/uploadify.swf',
uploader:'uploadPhoto.action?username=',
formData:{PHPSESSID:'xxx', ajax:1},
queueID:'fileQueue',
buttonImage:'uploadify/img/add.jpg',
buttonClass:'my-uploadify-button',
width:102,
auto:false
}"
/>
//上传按钮
οnclick="publishNow();">立即发布
οnclick="publishDelay();">预发布
id="mail" checked="checked">
id="mailconfig">通知业主