PDA

View Full Version : [CLOSED] code editor issues



BostonMerlin
13 Apr 2012, 8:33 AM
I know you guys are working through a bunch of issues but wanted to give you another use case that's causing those error circles (circle with x in them) to show up next to code that works.




var pageControls =
{xtype:'panel',
items:[
{xtype:'component', html:"<img src='" + imagePath + newsItem.get("ImageUrl") + "' style='width:150px; height:75px; float:left;padding-right:5px;'>",},
{xtype:'component', cls: 'widgetNewsTitle', html:newsItem.get('Title') + '<br>',},
{xtype:'component', cls: 'widgetNewsDescription', html: newsItem.get('PubDate') + ': ' + newsItem.get('Description'),},
{xtype:'button', ui:'cfnorange',style:'color:#336699;float:right;margin-top:10px;margin-bottom:0px; margin-right:10px; width:50px;', dock:'bottom', text:'Read', handler: function(){widget.showArticle(newsItem.get('ArticleLinkID'));}},
]
};

aconran
13 Apr 2012, 9:53 AM
Mouse over those error circles. It will show you a tooltip what is wrong with the above code.

Oh okay, I'll spoil the surprise. You have an extra comma at the end of each line. This is invalid JavaScript but some browsers will ignore it and proceed to execute it. Internet Explorer will not.

BostonMerlin
13 Apr 2012, 10:18 AM
Fair enough. Thanks.