1. #1
    Ext User
    Join Date
    Apr 2007
    Posts
    12
    Vote Rating
    0
    mattajlsm is on a distinguished road

      0  

    Default missing img close in Ext.menu.Item

    missing img close in Ext.menu.Item


    Hi,
    After reading the last post in this thread http://extjs.com/forum/showthread.php?t=4880&page=3
    I think I also get an unclosed element. Trying a new Ext.menu.Menu with Ext.menu.Item in application/xhtml+xml mime-type I get this 2 errors in FireFox :

    Code:
    Erreur : balise ne correspondant pas. Attendu : </img>. [that means end tag expected...]
    Fichier source : 
    Ligne : 1, Colonne : 121
    Code source :
    <a xmlns="http://www.w3.org/1999/xhtml"><img src="http://extjs.com/s.gif" class="x-menu-item-icon">Current Open Events</a>------------------------------------------------------------------------------------------------------------------------^
    
    Erreur : [Exception... "An invalid or illegal string was specified"  code: "12" nsresult: "0x8053000c (NS_ERROR_DOM_SYNTAX_ERR)"  location: "http://localhost:8080/navimages2/_support/piv/scripts/ext-1.0.1/ext-all.js Line: 167"]
    Fichier source : http://localhost:8080/navimages2/_support/piv/scripts/ext-1.0.1/ext-all.js
    Ligne : 167
    The script was :

    Code:
    var menu = new Ext.menu.Menu({
    	id: 'menu',
    	items: [ 
    		
    		new Ext.menu.Item({
    			text: 	'Current Open Events',
    			id:		'tb_OpenEvents'
    		})
    	
    	] 
    });
    
    
    var mb = new Ext.MenuButton('toolbar',{
    						text : 'bouton2',
    						menu : menu ,
    						menuAlign : 'tl-tr?',
    						tooltip : 'help !'
    						});
    hope this help.

    Regards,
    Matthieu

  2. #2
    Ext User haibijon's Avatar
    Join Date
    Mar 2007
    Posts
    105
    Vote Rating
    0
    haibijon is on a distinguished road

      0  

    Default


    Please switch your script to include ext-all-debug.js and repost the error. ext-all.js is a compact-unreadable file so your error is pretty much meaningless, which is why ext-all-debug is there, so you can use it to debug.

  3. #3
    Ext User
    Join Date
    Apr 2007
    Posts
    12
    Vote Rating
    0
    mattajlsm is on a distinguished road

      0  

    Default


    sorry you're right, it's much easyer with ext-debug :
    Code:
    Erreur : balise ne correspondant pas. Attendu : </img>.
    Fichier source : 
    Ligne : 1, Colonne : 121
    Code source :
    <a xmlns="http://www.w3.org/1999/xhtml"><img src="http://extjs.com/s.gif" class="x-menu-item-icon">Current Open Events</a>------------------------------------------------------------------------------------------------------------------------^
    
    
    Erreur : [Exception... "An invalid or illegal string was specified"  code: "12" nsresult: "0x8053000c (NS_ERROR_DOM_SYNTAX_ERR)"  location: "http://localhost:8080/navimages2/_support/piv/scripts/ext-1.0.1/ext-all-debug.js Line: 19631"]
    Fichier source : http://localhost:8080/navimages2/_support/piv/scripts/ext-1.0.1/ext-all-debug.js
    Ligne : 19631
    ext-all-debug.js
    Ligne : 19631
    is the definition of Ext.extend where
    Code:
    el.innerHTML = String.format(
                    '<img src="{0}" class="x-menu-item-icon">{1}',
                    this.icon || Ext.BLANK_IMAGE_URL, this.text);

  4. #4
    Ext User haibijon's Avatar
    Join Date
    Mar 2007
    Posts
    105
    Vote Rating
    0
    haibijon is on a distinguished road

      0  

    Default


    Thanks, I use XHTML too. I'm hoping Jack will have this fixed in the next rev!

  5. #5
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    Tampa, FL
    Posts
    6,955
    Vote Rating
    16
    jack.slocum will become famous soon enough

      0  

    Default


    I made the update in SVN.
    Jack Slocum
    Ext JS Founder
    Original author of Ext JS 1, 2 & 3.
    Twitter: @jackslocum
    jack@extjs.com

  6. #6
    Ext User haibijon's Avatar
    Join Date
    Mar 2007
    Posts
    105
    Vote Rating
    0
    haibijon is on a distinguished road

      0  

    Default


    Thanks Jack!

  7. #7
    Ext User
    Join Date
    Apr 2007
    Posts
    12
    Vote Rating
    0
    mattajlsm is on a distinguished road

      0  

    Default


    happy to have helped, thanks for your quick reaction jack.

Thread Participants: 2