我的网络应用程序在Firefox或Chrome上正常工作,但在IE中则不行.它向我显示以下消息:
Object不支持此属性或方法
文件:ext-all.js - 行:7 - 字符:6100
任何想法如何解决它?
顺便说一句:我正在使用ext 3.4.
编辑:我所有的ext布局创建者代码:
Ext.onReady(function() {
var viewport = new Ext.Viewport({
layout: 'border',
renderTo: document.body,
items: [{
region: 'north',
height: 25,
xtype: 'toolbar',
items: [{
xtype: 'button',
text: 'Início',
iconCls: 'home',
handler:function() {
var tabs = Ext.getCmp('dynamic-tabs');
tabs.add({
title: 'Início',
closable:true,
iconCls:'home'
}).show();
}
}, {
xtype: 'button',
text: 'Sistema',
iconCls: 'sistema',
menu: {
items: [{
text: 'Usuários',
iconCls: 'usuario',
handler: function(){ },
menu: {
items: [{
text: 'Teste1',
iconCls: 'usuario',
handler: function(){ …Run Code Online (Sandbox Code Playgroud) 我想在我的Web应用程序中使用extjs创建类似于开/关按钮的移动设备.我找不到任何样品或解决方案.我想要这样:演示
CSS
/*
Created by @JohnieHjelm. I took the liberty of doing this ON/OFF switch
just to express my love for CSS3. You're free to use this and of course
I hoped you learned something. Sharing is Caring?
*/
body{
background:#eee;
}
ul{
list-style:none;
width:85px;
height:26px;
position:absolute;
top:50%;
left:50%;
margin:-13px 0 0 -42px;
}
ul li{
float:left;
line-height:23px;
font-size:11px;
padding:2px 10px 0;
background: #E5E5E5;
background-image:-webkit-gradient(linear, 0% 0%, 0% 100%, from(#F3F3F3), to(#E5E5E5));
text-shadow:0 1px 0 #FFF;
border-left:1px solid #D5D5D5;
border-top:1px …Run Code Online (Sandbox Code Playgroud) 我发现extjs编辑器还有一个问题.
当我复制
<ol type="A" style="margin-top: 0pt; margin-bottom: 0pt;">
<li style="line-height: 115%; font-size: 11pt; margin-top: 0pt; margin-bottom: 10pt;"><span style="font-family: Calibri; font-size: 11pt;">Main Heading 1</span></li>
</ol>
<p style="margin: 0pt 0pt 10pt 72pt; line-height: 115%; text-indent: -18pt; font-size: 11pt;"><span style="font-family: Calibri; font-size: 11pt;">1.</span><span style='font: 7pt/normal "Times New Roman"; font-size-adjust: none; font-stretch: normal;'> </span><span style="font-family: Calibri; font-size: 11pt;">Item 1</span></p>
<p style="margin: 0pt 0pt 10pt 72pt; line-height: 115%; text-indent: -18pt; font-size: 11pt;"><span style="font-family: Calibri; font-size: 11pt;">2.</span><span style='font: 7pt/normal "Times New Roman"; font-size-adjust: none; font-stretch: normal;'> …Run Code Online (Sandbox Code Playgroud)我通过调用向中心区域的选项卡面板添加了一个按钮
var add = tabSelection.addButton({
id : 'add',
text : 'Add',
hidden : true,
tooltip : 'Please highlight the correct value and click Add to create new contact',
handler : addContact
});
Run Code Online (Sandbox Code Playgroud)
西部地区有两个带有手风琴布局的单选按钮,标有"内部"和"外部".我希望通过捕获单选按钮单击动态更改工具提示.
我可以捕获单选按钮单击,当我相应地设置按钮的工具提示时,
add.setToolTip('Please highlight the correct value and click Add to create new internalcontact');如果单击内部客户端.
add.setToolTip('Please highlight the correct value and click Add to create new external contact');当点击外部时.
如何在TabControl中的每个选项卡的标题中添加按钮(工具)?
我只是可以在TabPanel中添加工具,但我想在选项卡中添加.
我也试过这个,但没有成功:
var lTabPanel = Ext.create('Ext.tab.Panel', {
width: 400,
height: 400,
renderTo: document.body,
items: [{
title: 'Home',
html: 'Home',
itemId: 'home'
}, {
title: 'Users',
html: 'Users',
itemId: 'users',
hidden: true
}, {
title : 'Tickets',
html : 'Tickets',
itemId : 'tickets',
tools:[{
type:'gear',
tooltip: 'Options',
handler: function(event, toolEl, panel){
// Some code.
}
}]
}]
});
Run Code Online (Sandbox Code Playgroud)
任何的想法?
谢谢!
我正试图将菜单链接起来.看一看:
Ext.create('Ext.Button', {
id: 'MyButton',
text: 'Click me',
renderTo: Ext.getBody(),
menuAlign: 'tl-bl',
menu: {
itemId: 'MyMenu',
forceLayout: true,
items:
[
{
text : 'Option 1',
itemId: 'MyItemMenu1'
}, {
text : 'Option 2',
itemId: 'MyItemMenu2'
}, {
text : 'Get the parent!',
itemId : 'MyItemMenu3',
handler: function(){
// Get the item menu.
var MyItemMenu3 = this;
alert(MyItemMenu3.getItemId());
// Get the menu.
var MyMenu = MyItemMenu3.ownerCt;
alert(MyMenu.getItemId());
// Try to get the button.
var MyButton = MyMenu.ownerCt;
alert(MyButton);
// Returns:
// …Run Code Online (Sandbox Code Playgroud) 我们在旗舰应用程序中使用ExtJS 3.x.我们的应用程序管理区域分为我们提供的不同模块.每个模块以及随后模块的不同CRUD操作的每个页面都有自己的.js文件来处理功能.
当我们开始时,我们只是将所有代码抛入Ext.onReady()并且并不真正担心全局命名空间(嘿......我们从未真正将自己视为javascript开发人员).在获得ExtJS之后,我开始使用单例模式并从中调用init方法Ext.onReady().
var newModule = {
propertyOne: 'asfd',
propertyTwo: 'asdf',
init: function() {
// set up
}
};
Ext.onReady(function() {
newModule.init();
});
Run Code Online (Sandbox Code Playgroud)
这是javascript单例模式的正确使用吗?是否有任何模式适合ExtJS比单例更好,比如说模块模式?
我一直在使用本指南作为学习Javascript设计模式的起点.
我正在使用一个似乎使用Ext.Ajax.request(使用ExtJS 3)发送跨域请求的脚本- 其中一些是POST请求.正在考虑摆脱ExtJS3(可能总体上远离ExtJS)但是快速尝试使用XMLHttpRequest不起作用; 如何找出用于发送这些跨域请求的技术?
var colModel = new Ext.grid.ColumnModel({
columns: [ columns here...]
})
var grid = new Ext.Ext.grid.GridPanel({
store: store,
loadMask: true,
autoExpandColumn: 'itemDescription',
stripeRows: true,
colModel: colModel
})
var form = new Ext.FormPanel({
labelWidth: 150,
bodyStyle: 'padding:2px 5px;',
autoScroll: true,
items:[
new Ext.form.FieldSet({
layout: 'fit',
collapsible: true,
height:300,
items: [
grid
]
}
]
})
Run Code Online (Sandbox Code Playgroud)
一旦窗口调整大小,网格不会改变其宽度...任何想法???
我使用的是ExtJS 3.3,但这也可能与其他版本相关.
我在基于ExtJS的UI中使用Slider控件.我有一个工具提示设置为在您拖动它时显示值,按照此处的"Slider with Tip"示例:http://dev.sencha.com/deploy/ext-3.3.1/examples/slider/slider. HTML
在我看来,如果有一个滑块没有指示值是什么(或在这种情况下,直到你开始滑动它)是非常差的用户体验.我想在任一端添加标签以显示滑块所代表的范围.像这样的东西:

所以,当然,我想知道:这可能与标准控制本身有关吗?(我查看了文档,但没有任何内容跳出来)?还是有一种巧妙的方法来实现这一目标?
extjs3 ×10
extjs ×8
javascript ×3
button ×2
extjs4 ×2
ajax ×1
cross-domain ×1
extjs4.1 ×1
extjs4.2 ×1
module ×1
singleton ×1
togglebutton ×1
tooltip ×1