While working on a site I’m building I had a dojo.Dialog that I was adding as a click event. It was supposed to load some HTML with script tags from a relative path and it worked on every browser just fine, just not Chrome. The HTML would still load in Chrome, it’s just that none of the scripts would execute.
I found out that lots of developers have run into this and the reason it happens is Chrome considers them outside of the local domain, so for security it doesn’t allow it. One workaround is to start Chrome from the command line with the parameter: –allow-file-access-from-files.
However the best option was just to use dojox.widget.DialogSimple. It is basically a dijit.Dialog with dojox.layout.ContentPane (which is a dijit.layout.ContentPane but with the ability to execute scripts on by default, and load css – off by default).
For more information on the first solution:
http://stackoverflow.com/questions/3430638/accessing-relative-urls-via-ajax-from-file-content
http://code.google.com/p/chromium/issues/detail?id=40787
http://code.google.com/p/chromium/issues/detail?id=47416