jsp 实现图片预览,并显示在弹出window中(讨论)

luohaobubu 2012-04-06 10:47:43


<form enctype="multipart/form-data" id="showtype_form" name="form" action="advertisement/advertisement/advertisementAddshowtype.action" method="post">
<table>
<tr class="showtype_mixtext">
<td width="80" height="32" align="right" class="attrName">
<font color="red">*</font> 文字推广语:
</td>
<td width="323" class="attrValue">
<input type="text" id="publishword2" class="textInput" name="bannerPublishword_title1" value=""/>
  <input type="text" id="publishword3" class="textInput" name="bannerPublishword_title2" value=""/>
</td>
</tr>
<tr class="showtype_mixtext">
<td width="80" height="32" align="right" class="attrName">
<font color="red">*</font> 广告小图标:
</td>
<td width="323" class="attrValue">
<input type="file" name="bannerIcon" value=""/>
<input type="hidden" name="bannerIconName"/>
</td>
</tr>
<tr class="subTr">
<td height="65"> 
</td>
<td style="padding-top:15px;">
 
<input class="submitButton" name="precious" type="button" value="上一步" onclick="javascript:location.href='<%=basePath%>advertisement/advertisement/advertisementToAddoriginality.action';"/>
 
<input class="submitButton" id="showtype_preview" name="next" type="submit" value="效果预览" />  
  
<input class="submitButton" id="showtype_submit" name="next" type="submit" value="发布"/>
</td>
</tr>
</table>
</form>


需求是这样的:用户点击"效果预览"-->异步提交icon到服务器,不用保存到数据库-->在action中获得icon,并封装在一个html中-->返回html,给子窗口.

使用了jquery,struts2,jsp.

问题是:我该怎么实现icon的异步上传,而不影响"发布",然后能在子窗口(新窗口)中展示"广告小图标"加上"文字推广语"
能附上代码更好,提供思路也很感谢你~~
...全文
251 6 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
luohaobubu 2012-04-06
  • 打赏
  • 举报
回复
是啊~~~~求解
潮起潮落 2012-04-06
  • 打赏
  • 举报
回复
iframe..
ajax是文本传输,怎么搞文件呢
挨踢直男 2012-04-06
  • 打赏
  • 举报
回复
十一文 2012-04-06
  • 打赏
  • 举报
回复
用axax上传文件即可 google哈你会发现好多例子
Acesidonu 2012-04-06
  • 打赏
  • 举报
回复
jquery的ajax提交获得返回的html再在新窗口中打开
孟子E章 2012-04-06
  • 打赏
  • 举报
回复
Jsp中Uploadify插件的使用

http://blog.sina.com.cn/s/blog_5db0dfe40100idl6.html

52,792

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 Ajax
社区管理员
  • Ajax
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧