Sun 29 Jul 2007
I spent last 2 hours debugging a page that loads orders from an XML stream and displays them on screen in a DOJO Content Pane widget. Page works (worked) perfectly fine but was broken in Internet Explorer. For anyone who has had the pleasure of debugging:
“DEBUG: Error running scripts from content:Expected identifier, string or number“, here is something that might help -make sure your strings / string object propertiesare really strings in Internet Explorer. As an example of a broken piece of code, see this:
var orderTab = dojo.widget.createWidget( "dojo:ContentPane",
{
class:'tabContainer',
"closable": true,
"label": "Order # " + intStoreOrderId,
"href": "index.popup.php"
}
);
This can easily be fixed, simply by ensuring that class property isreferred as string “class”. Here is the version that works (both, Firefox and Internet Explorer).
var orderTab = dojo.widget.createWidget( "dojo:ContentPane",
{
"class":'tabContainer',
"closable": true,
"label": "Order # " + intStoreOrderId,
"href": "index.popup.php"
}
);
Between, above code works unaltered in Firefox. Not having good JavaScript debugger in Internet Explorer make it all the more difficult to debug these nasty bugs.
Leave a Reply
You must be logged in to post a comment.