想使用这个链接调用下面的代码,弹出窗口,请问应该怎么写?谢谢了!
<A  href="javascript:void(0)" >上传数据</A> <script type="text/javascript" >
     Ext.onReady(function()
     {
         var win = new Ext.Window({
             title: '科大家园网络电台上传接口',
             width: 600,
             height: 400,
             resizable: false,
             layout: 'fit',
             items: [new UploadPanel({
             //xtype: 'swfupload-ext',
             upload_url: "UploadHandler.ashx", //服务程序设置
             post_params: {"ASPSESSID": "<%=Session.SessionID %>"},
             file_size_limit: "40 MB", //上传文件设置
             file_types: "*.*",
             file_types_description: "All Files",
             file_upload_limit: 0,    // Zero means unlimited
             button_image_url: "images/swfupload/icons/button_add.png", //慎重改动
             button_placeholder_id: "spanButtonPlaceholder", //慎重改动
             button_width: 70, //慎重改动
             button_height: 22, //慎重改动
             button_text: '<span class="x-buttonSmall"></span>', //慎重改动
             button_text_style: '.x-buttonSmall { font-size: 14pt;vertical-align;middle; }',//慎重改动
             flash_url: "lib/swfupload.swf", 
             debug: false})]
         });
         win.show();
     });

解决方案 »

  1.   

    <A id="tanchu" href="javascript:void(0)" >上传数据</A><script type="text/javascript" >
         Ext.onReady(function()
         {
             var win = new Ext.Window({
                 title: '科大家园网络电台上传接口',
                 width: 600,
                 height: 400,
                 el:'tanchu',
                 resizable: false,
                 layout: 'fit',
                 items: [new UploadPanel({
                 //xtype: 'swfupload-ext',
                 upload_url: "UploadHandler.ashx", //服务程序设置
                 post_params: {"ASPSESSID": "<%=Session.SessionID %>"},
                 file_size_limit: "40 MB", //上传文件设置
                 file_types: "*.*",
                 file_types_description: "All Files",
                 file_upload_limit: 0,    // Zero means unlimited
                 button_image_url: "images/swfupload/icons/button_add.png", //慎重改动
                 button_placeholder_id: "spanButtonPlaceholder", //慎重改动
                 button_width: 70, //慎重改动
                 button_height: 22, //慎重改动
                 button_text: '<span class="x-buttonSmall"></span>', //慎重改动
                 button_text_style: '.x-buttonSmall { font-size: 14pt;vertical-align;middle; }',//慎重改动
                 flash_url: "lib/swfupload.swf", 
                 debug: false})]
             });
             win.show();
         });
      

  2.   

    晕死。在里面加个el:'tanchu'
    <A id="tanchu" href="javascript:void(0)" >上传数据</A>
    标签上加个id="tanchu"Ext.onReady(function()
         {
             var win = new Ext.Window({
                 title: '科大家园网络电台上传接口',
                 width: 600,
                 height: 400,
                 el:'tanchu',
                 resizable: false,
                 layout: 'fit',
                 items: [new UploadPanel({
                 //xtype: 'swfupload-ext',
                 upload_url: "UploadHandler.ashx", //服务程序设置
                 post_params: {"ASPSESSID": "<%=Session.SessionID %>"},
                 file_size_limit: "40 MB", //上传文件设置
                 file_types: "*.*",
                 file_types_description: "All Files",
                 file_upload_limit: 0,    // Zero means unlimited
                 button_image_url: "images/swfupload/icons/button_add.png", //慎重改动
                 button_placeholder_id: "spanButtonPlaceholder", //慎重改动
                 button_width: 70, //慎重改动
                 button_height: 22, //慎重改动
                 button_text: '<span class="x-buttonSmall"></span>', //慎重改动
                 button_text_style: '.x-buttonSmall { font-size: 14pt;vertical-align;middle; }',//慎重改动
                 flash_url: "lib/swfupload.swf", 
                 debug: false})]
             });
             win.show();
         });
      

  3.   

    Ext.onReady的意思是文档加载完毕就运行当中的代码 你把函数提出来 掉就可以了
    <A href="javascript:void(0)" onclick="showWin();" >上传数据</A>function showWin(){
       var win = new Ext.Window({
                 title: '科大家园网络电台上传接口',
                 width: 600,
                 height: 400,
                 resizable: false,
                 layout: 'fit',
                 items: [new UploadPanel({
                 //xtype: 'swfupload-ext',
                 upload_url: "UploadHandler.ashx", //服务程序设置
                 post_params: {"ASPSESSID": "<%=Session.SessionID %>"},
                 file_size_limit: "40 MB", //上传文件设置
                 file_types: "*.*",
                 file_types_description: "All Files",
                 file_upload_limit: 0,    // Zero means unlimited
                 button_image_url: "images/swfupload/icons/button_add.png", //慎重改动
                 button_placeholder_id: "spanButtonPlaceholder", //慎重改动
                 button_width: 70, //慎重改动
                 button_height: 22, //慎重改动
                 button_text: '<span class="x-buttonSmall"></span>', //慎重改动
                 button_text_style: '.x-buttonSmall { font-size: 14pt;vertical-align;middle; }',//慎重改动
                 flash_url: "lib/swfupload.swf", 
                 debug: false})]
             });
             win.show();}
      

  4.   

    至于你这部分<%=Session.SessionID %> jsp的东西 可以在jsp中写个隐藏标签 用js获取其值 加到代码里就行了