0

我正在尝试使用 Ajax 在 Ext.Window() 中加载 ExtJs 控件,但它不通过 ajax 加载。

我想要的是在 ExtJs 日历的新事件窗口中,我正在进行 ajax 调用,作为响应,我发送带有 ExtJs 控件的 Html,但 ExtJs 控件没有出现在此屏幕中。那么我该怎么做呢?

// 我的 Ajax 请求...

var win = new Ext.Window({
       name:"new-event",
        modal:true,
        autoTabs:true,
       shadow:true,
       width:680,
       id:'new-event',
       height:500,
       autoScroll:false,
       autoLoad:{
           url:'new'
       },
       title:"New Event"
    });
win.show();

// 我在响应中发送的响应 Html(Json 编码)

<ext:TextField name="name" allowBlank="false" enablekeyevents="true">
   <prop:Actions>
      <ext:Action onevent="focus">
         <prop:Handler>
            getFocus("1");
         </prop:Handler>
      </ext:Action>
      <ext:Action onevent="blur">
         <prop:Handler>
            lostFocus("1");
         </prop:Handler>
      </ext:Action>
   </prop:Actions>
</ext:TextField>
4

1 回答 1

0

您是否尝试在自动加载时启用脚本?将以下行添加到您的自动加载代码中

autoLoad:{
    url:'new'
    // Here add the scripts enabling
    ,scripts: true
},
于 2012-07-03T13:04:38.347 回答