I am creating a simple application where I am going to have a lot of different dropdown type boxes. I really like the dojox/form/CheckedMultiSelect. However, I am having an issue when trying to load the contents of it from a .js file. I've attached my test file and the js file. It seems to be working okay in IE but is not working in Safari or Chrome. I have no idea why? As you can see from my code the dojox/form/CheckedMultiSelect seems to work in Safari and Chrome. It only seems to be an issue when I am trying to populate it via the .js code.
Any help would be very much appreciated as this is very frustrating and I have been working on this for a few days now.
Thanks,
Michael
Thanks Ken. I know about AMD and only used the legacy because it was just the quickest way to get the code out there for you guys to view. I looked at the bookmark example but because it is a widget vs a CheckedMultiSelect box I'm not sure how to equate one to the other. Your eample shows me how to do it all in the one html file but I really want to seperate out the values just like the bookmarks. I have a feeling it would take you like 5 minutes to whip up an example like this. You seem to be a guru at this stuff.
I know this is a bit late in the game and hopefully not too obvious, but by setting up your dojoConfig var within a script tag of your html and setting up your packages, async and parseOnLOad options we've never had any issues:
<script>
var path_location = location.pathname.replace(/\/[^/]+$/, "");
var dojoConfig = {
packages : [{name: "agsjs", location: path_location + "/agsjs"},
{name: "js", location: path_location + "/js"}],
async : true,
parseOnLoad : true
};
</script>
Thanks,
David
Thanks David. I tried this but it did not work. I really wish it were that easy.
For now I have removed all of the these and replaced them with dijit.form.MultiSelect. It is uglier but they seem to work fine.
Thanks to all who tried to help.
Michael,
Strange, Lucas's example worked for me in both FirsFox 31 and Chrome 36