eWebEditor提交表单问题 10
在这之前有判断eWebEditor是否为空,不管有没填写内容它都判断是空,就去掉这步,之后提交表单时,总是得不到iCtText的内容!总是提交空的数据<iframenam...
在这之前有判断eWebEditor是否为空,不管有没填写内容它都判断是空,就去掉这步,之后提交表单时, 总是得不到iCtText的内容!总是提交空的数据
<iframe name="hidden" width="100%" height="0"></iframe>
<form id="infoAdd" name="infoAdd" method="post" action="" class="saveHistory" target="hidden">
<textarea name="iCtText" ROWS="20" COLS="70" style="height:expression(this.style.posHeight=this.scrollHeight);display:none" id="iCtText"></textarea>
<IFRAME ID="eWebEditor1" SRC="../../WebEditor/ewebeditor.asp?id=iCtText&style=s_blue" FRAMEBORDER="0" SCROLLING="no" WIDTH="743" HEIGHT="450"></IFRAME>
<tr>
<td colspan="2">
<input name="method" type="hidden" id="method" value="InfoAdd">
<input type="submit" name="Submit" id="Submit" value="发 表 话 题">
</form>
</td>
</tr> 展开
<iframe name="hidden" width="100%" height="0"></iframe>
<form id="infoAdd" name="infoAdd" method="post" action="" class="saveHistory" target="hidden">
<textarea name="iCtText" ROWS="20" COLS="70" style="height:expression(this.style.posHeight=this.scrollHeight);display:none" id="iCtText"></textarea>
<IFRAME ID="eWebEditor1" SRC="../../WebEditor/ewebeditor.asp?id=iCtText&style=s_blue" FRAMEBORDER="0" SCROLLING="no" WIDTH="743" HEIGHT="450"></IFRAME>
<tr>
<td colspan="2">
<input name="method" type="hidden" id="method" value="InfoAdd">
<input type="submit" name="Submit" id="Submit" value="发 表 话 题">
</form>
</td>
</tr> 展开
2个回答
2010-07-30
展开全部
我因为表单要写onsubmit事件,但onsubmit返回false时ewebediter还是执行了提交,所以我研究过这个问题
在\include\Editor.js 的function setLinkedField()
我屏闭了这一行//oForm.attachEvent("onsubmit", AttachSubmit) ;
然后怎样提交字串框都是空的,
在表单的onsubmit事件中加下面这一句就OK了
window.frames["eWebEditor1"].AttachSubmit();
希望对你有帮助!!
哎呀我打不开知道的登陆页.....bG9uZ2di
下面是Editor.js文件的部分代码
// 设置所属表单的提交或reset事件
function setLinkedField() {
if (! oLinkField) return ;
var oForm = oLinkField.form ;
if (!oForm) return ;
// 附加submit事件
//oForm.attachEvent("onsubmit", AttachSubmit) ;
if (! oForm.doneAutoRemote) oForm.doneAutoRemote = 0 ;
if (! oForm.submitEditor) oForm.submitEditor = new Array() ;
oForm.submitEditor[oForm.submitEditor.length] = AttachSubmit ;
if (! oForm.originalSubmit) {
oForm.originalSubmit = oForm.submit ;
oForm.submit = function() {
if (this.submitEditor) {
for (var i = 0 ; i < this.submitEditor.length ; i++) {
this.submitEditor[i]() ;
}
}
this.originalSubmit() ;
}
}
// 附加reset事件
oForm.attachEvent("onreset", AttachReset) ;
if (! oForm.resetEditor) oForm.resetEditor = new Array() ;
oForm.resetEditor[oForm.resetEditor.length] = AttachReset ;
if (! oForm.originalReset) {
oForm.originalReset = oForm.reset ;
oForm.reset = function() {
if (this.resetEditor) {
for (var i = 0 ; i < this.resetEditor.length ; i++) {
this.resetEditor[i]() ;
}
}
this.originalReset() ;
}
}
}
// 附加submit提交事件,大表单数据提交,远程文件获取,保存eWebEditor中的内容
var bDoneAutoRemote = false;
function AttachSubmit() {
var oForm = oLinkField.form ;
if (!oForm) return;
if ((config.AutoRemote=="1")&&(!bDoneAutoRemote)){
parent.event.returnValue = false;
bDoneAutoRemote = true;
remoteUpload();
} else {
var html = getHTML();
ContentEdit.value = html;
if (sCurrMode=="TEXT"){
html = HTMLEncode(html);
}
splitTextField(oLinkField, html);
}
}
在\include\Editor.js 的function setLinkedField()
我屏闭了这一行//oForm.attachEvent("onsubmit", AttachSubmit) ;
然后怎样提交字串框都是空的,
在表单的onsubmit事件中加下面这一句就OK了
window.frames["eWebEditor1"].AttachSubmit();
希望对你有帮助!!
哎呀我打不开知道的登陆页.....bG9uZ2di
下面是Editor.js文件的部分代码
// 设置所属表单的提交或reset事件
function setLinkedField() {
if (! oLinkField) return ;
var oForm = oLinkField.form ;
if (!oForm) return ;
// 附加submit事件
//oForm.attachEvent("onsubmit", AttachSubmit) ;
if (! oForm.doneAutoRemote) oForm.doneAutoRemote = 0 ;
if (! oForm.submitEditor) oForm.submitEditor = new Array() ;
oForm.submitEditor[oForm.submitEditor.length] = AttachSubmit ;
if (! oForm.originalSubmit) {
oForm.originalSubmit = oForm.submit ;
oForm.submit = function() {
if (this.submitEditor) {
for (var i = 0 ; i < this.submitEditor.length ; i++) {
this.submitEditor[i]() ;
}
}
this.originalSubmit() ;
}
}
// 附加reset事件
oForm.attachEvent("onreset", AttachReset) ;
if (! oForm.resetEditor) oForm.resetEditor = new Array() ;
oForm.resetEditor[oForm.resetEditor.length] = AttachReset ;
if (! oForm.originalReset) {
oForm.originalReset = oForm.reset ;
oForm.reset = function() {
if (this.resetEditor) {
for (var i = 0 ; i < this.resetEditor.length ; i++) {
this.resetEditor[i]() ;
}
}
this.originalReset() ;
}
}
}
// 附加submit提交事件,大表单数据提交,远程文件获取,保存eWebEditor中的内容
var bDoneAutoRemote = false;
function AttachSubmit() {
var oForm = oLinkField.form ;
if (!oForm) return;
if ((config.AutoRemote=="1")&&(!bDoneAutoRemote)){
parent.event.returnValue = false;
bDoneAutoRemote = true;
remoteUpload();
} else {
var html = getHTML();
ContentEdit.value = html;
if (sCurrMode=="TEXT"){
html = HTMLEncode(html);
}
splitTextField(oLinkField, html);
}
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询