jjleng86 2009-07-27 22:57
浏览 208
已采纳

为什么我这样写,这个按钮总不起作用啊

[code="java"]if (!this.uploadDialog)
{
this.uploadFile = new GO.form.UploadFile
({
inputName: "attachments",
addText: GO.lang.smallUpload
});
this.upForm = new Ext.form.FormPanel
({
fileUpload: true,
waitMsgTarget: true,
items:
[
this.uploadFile,
new Ext.Button
({
text: GO.lang.largeUpload,
handler: function()
{
if (!deployJava.isWebStartInstalled("1.5.0"))
{
Ext.MessageBox.alert(GO.lang.strError,GO.lang.noJava)
}else{
window.open(GO.settings.modules.files.url + "jupload/index.php?path=" + encodeURIComponent(this.path));
this.uploadDialog.hide();
GO.currentFilesStore = this.getActiveGridStore()
}
}, scope: this
})
], cls: "go-form-panel"
});
this.uploadDialog = new Ext.Window
({
title: GO.lang.uploadFiles,
layout: "fit",
modal: false,
height: 300, width: 300,
closeAction: "hide",
items: this.upForm,
buttons:
[{
text: GO.files.lang.startTransfer,
handler:this.uploadHandler, scope: this
},{
text: GO.lang.cmdClose,
handler: function()
{
this.uploadDialog.hide()
}, scope: this
}]
})
}
this.uploadDialog.show();

uploadHandler: function()
{
alert("CCCCC");
//this.upForm.container.mask(GO.lang.waitMsgUpload, "x-mask-loading");
this.upForm.form.submit
({
waitTitle: '请稍候',
waitMsg: '正在提交数据,请稍候....',
url: GO.settings.modules.files.url + "action.php",
params:
{
task: "upload",
},
success: function(A, B)
{
this.uploadFile.clearQueue();
this.uploadDialog.hide();
this.sendOverwrite
({
path: this.path,
task: "overwrite"
});
this.upForm.container.unmask()
},
failure: function(A,B)
{
this.upForm.container.unmask()
}, scope: this
})
}
[/code]

上面的是我代码,但是点GO.files.lang.startTransfer, 这个按钮总不起作用啊,好像是个摆设一样,有谁能帮帮我啊,急啊。
[b]问题补充:[/b]
我把你说的那里,uploadHandler改成了this.uploadHandler,但是不知道怎么会事,还是那样,我不知道怎么做了,好郁闷啊
[b]问题补充:[/b]
改了,结果报个错,我是OA里的,EXT框架,改了后,直接报个错,没有任何模板加载

  • 写回答

3条回答 默认 最新

  • iteye_10013 2009-07-28 09:14
    关注

    handler:this.uploadHandler

    改为

    handler:function(){
    alert(this);
    alert(this.uploadHandler.toString();
    }

    看看输出了什么

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥30 Unity接入微信SDK 无法开启摄像头
  • ¥20 有偿 写代码 要用特定的软件anaconda 里的jvpyter 用python3写
  • ¥20 cad图纸,chx-3六轴码垛机器人
  • ¥15 移动摄像头专网需要解vlan
  • ¥20 access多表提取相同字段数据并合并
  • ¥20 基于MSP430f5529的MPU6050驱动,求出欧拉角
  • ¥20 Java-Oj-桌布的计算
  • ¥15 powerbuilder中的datawindow数据整合到新的DataWindow
  • ¥20 有人知道这种图怎么画吗?
  • ¥15 pyqt6如何引用qrc文件加载里面的的资源