Solved! Go to Solution.
Are you running the sample code from your file system or from a web server? In other words, when you try to run the sample on your machine, does the URL start with file:// or http://? It needs to be the latter.
More info: http://developers.arcgis.com/en/javascript/jshelp/intro_devenv.html