PDA

View Full Version : IE7 Nested Menu/Toolbar Error



Clever Cutter
27 Sep 2007, 12:41 PM
I can get very standard menu+toolbars to load into IE7 just fine. I can get "nested" menus to work in FF just fine. However, in IE7 the menu does not load and the following javascript error is produced: 'render' is null or not an object". I stripped down all other possible issues and narrowed it all the way down to one menu of my toolbar. It is one that has menus within menus. I will paste the snippet below of the menu object causing the error. When this code is removed the menu displays fine so I'm 100% certain the cause is within this code somewhere. I am hoping someone here can point something out I did wrong. Just keep in mind the menu does nothing as of yet it's just for prototype purposes for a client.



/**
* Main Employee Menu
*/
var mainMenu = new Ext.menu.Menu({
id: 'mainMenu',
items: [
new Ext.menu.Item({
text: 'Client Services',
menu: {
items:
[
new Ext.menu.Item({
text: 'Load Order'
}),
new Ext.menu.Item({
text: 'Update Order Details'
}),
new Ext.menu.Item({
text: 'Update Batch Details'
}),
new Ext.menu.Item({
text: 'On Hold Approval'
}),
new Ext.menu.Item({
text: 'Disputes'
}),
new Ext.menu.Item({
text: 'Client Details'
}),
new Ext.menu.Item({
text: 'Client Login'
}),
]
}
}),
new Ext.menu.Item({
text: 'Operations',
menu: {
items:
[
new Ext.menu.Item({
text: 'Place Order'
}),
new Ext.menu.Item({
text: 'Confirm/Decline'
}),
new Ext.menu.Item({
text: 'Unassign/Reassign'
}),
new Ext.menu.Item({
text: 'Follow Up'
}),
new Ext.menu.Item({
text: 'Request On Hold'
})
]
}
}),
new Ext.menu.Item({
text: 'Quality Control',
menu: {
items:
[
new Ext.menu.Item({
text: 'Photo QA'
}),
new Ext.menu.Item({
text: 'Full QA'
}),
new Ext.menu.Item({
text: 'Request On Hold'
}),
new Ext.menu.Item({
text: 'Disputes'
})
]
}
}),
new Ext.menu.Item({
text: 'Administration',
menu: {
items:
[
new Ext.menu.Item({
text: 'User Accounts'
}),
new Ext.menu.Item({
text: 'Order Search'
}),
new Ext.menu.Item({
text: 'Agent Search'
}),
new Ext.menu.Item({
text: 'Update Notes'
}),
new Ext.menu.Item({
text: 'Change Fee'
}),
new Ext.menu.Item({
text: 'My Account'
})
]
}
})
]
});


Any help is appreciated. Thank you.

fay
27 Sep 2007, 12:53 PM
First look it seems like the classic "extra comma". See: http://extjs.com/forum/showthread.php?t=503


new Ext.menu.Item({
text: 'Client Login'
}),
]

Clever Cutter
27 Sep 2007, 1:15 PM
Damn, using Zend Studio I totally missed that. Thank you!!! I feel really bad for posting what seems like the most common problem on the forums. Can you recommend some simple application I can paste javscript into to easier detect syntax errors like that?

evant
27 Sep 2007, 2:55 PM
www.jslint.com