Ext


Go Back   Ext JS Forums > Ext JS Community Forums (1.x) [Unsupported] > Ext 1.x: Help

Reply
 
Thread Tools
  #1  
Old 09-09-2007, 02:35 AM
hazlema's Avatar
hazlema hazlema is offline
Ext User
 
Join Date: Sep 2007
Posts: 47
hazlema is on a distinguished road
Default Issue w/ prototype.js and Ext.menu

I didn't post this in bugs because it may not be a bug.
Ext may just not be able to handle the new prototype library.

this.focusEl has no properties http://localhost/resize/js/ext-all.js Line 86

Swapping out the new prototype libs for the old has seemingly fixed the issue, but I still wanted to mention it.

Here is the code I was using:
(Basicly its the example reduced to a single html page and simplified for learning purposes)

<html>
<head>
	<link rel="stylesheet" href="js/resources/css/ext-all.css" type="text/css">
	<script src="js/adapter/ext/ext-base.js" type="text/javascript"></script>
	<script src="js/ext-all.js" type="text/javascript"></script>
	<script src="js/prototype.js" type="text/javascript"></script>
</head>
<body>
<div id="container">
	<div id="toolbar">
	</div>
</div>

<script>
Ext.onReady(function()
{
    Ext.QuickTips.init();

    var menu = new Ext.menu.Menu({
        id: 'mainMenu',
        items: 
        [
            new Ext.menu.CheckItem({
                text: 'Selection Locked',
                checked: true,
                checkHandler: onItemCheck
            }),
            new Ext.menu.CheckItem({
                text: 'Maintain Aspect',
                checked: true,
                checkHandler: onItemCheck
            }), '-', 
            {
            	text: 'Selection Color',
              menu: 
              {
              	items:
               	[
                 	new Ext.menu.ColorItem({selectHandler:function(cp, color){
                   	alert('Color Selected', 'You chose {0}.', color);
                   }})
                 ]
              }
            }
        ]
    });

	  var tb = new Ext.Toolbar('toolbar');
    tb.add({
            cls: 'x-btn-text-icon bmenu', // icon and text class
            text:'Button w/ Menu',
            menu: menu  // assign menu by instance
    });

    function onItemCheck(item, checked){
        alert('Item Check', 'You {1} the "{0}" menu item.', item.text, checked ? 'checked' : 'unchecked');
    }
});
</script>
</body>
</html>
Reply With Quote
  #2  
Old 10-05-2007, 08:32 AM
dante's Avatar
dante dante is offline
Ext User
 
Join Date: Aug 2007
Posts: 67
dante is on a distinguished road
Default

I have the same problem. Which prototype version is working for you?
Reply With Quote
  #3  
Old 10-05-2007, 09:43 AM
hazlema's Avatar
hazlema hazlema is offline
Ext User
 
Join Date: Sep 2007
Posts: 47
hazlema is on a distinguished road
Default

Quote:
Originally Posted by dante View Post
I have the same problem. Which prototype version is working for you?
Prototype JavaScript framework, version 1.5.0
I also use the standard ext-base.js without any adapters
Reply With Quote
Reply

Thread Tools

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

All times are GMT -5. The time now is 03:11 AM.

© 2006-2009 Ext, LLC
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.