87,910
社区成员
发帖
与我相关
我的任务
分享
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="/struts-tags" prefix="s"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<link rel="stylesheet" type="text/css"
href="../resources/css/ext-all.css" />
<script type="text/javascript" src="../adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="../ext-all.js"></script>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'index.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body>
<script type="text/javascript">
Ext.onReady(function() {
var formPanel = new Ext.form.FormPanel({
baseCls: 'x-plain',
layout:'absolute',
url:'save-form.php',
defaultType: 'textfield',
items: [{
xtype: 'textarea',
name: 'content',
anchor: '100% 100%' // anchor width and height,
}]
});
var window = new Ext.Window({
title: 'Resize Me',
width: 400,
height:150,
minWidth: 400,
minHeight: 150,
maxWidth: 400,
maxHeight: 150,
closeAction:"close",
closable:false,
collapsible:true,
layout: 'fit',
plain:true,
bodyStyle:'padding:2px;',
buttonAlign:'right',
items: formPanel,
buttons:[{
text:"发布",
type:"submit",
handler:function(){
if(formPanel.form.isValid()){
var f = function(v) {
return function(){
var i = v / 11;
Ext.MessageBox.updateProgress(i, '');
}
}
for(var i = 1; i < 13; i++) {
setTimeout(f(i), i * 150);
}
//提交到服务器操作
formPanel.form.doAction("submit",{
url:"content.action",
method:"post",
params:"",
success:function(formPanel, action){
document.location='comment.jsp';
},
failure:function(form, action){
}
});
}
}
}]
});
window.show();
});
</script>
</body>
</html>