I'm using the concept for dynamic select menus provided here:
http://samuelmullen.com/2011/02/dynamic-dropdowns-with-rails-jquery-and-ajax/
I've isolated my problem to the first parameter for .post in this code:
this.change(function() {
$.post("dvbd", that.val(), null, "script");
});
I expect for the dvbd.js.erb file in the parent directory to be found and the jQuery contents therein executed. So, the location would be:
http://localhost:3000/parentdir/dvbd.js.erb
Instead, I get a 404 error where the location "http://localhost:3000/parentdir/dvbd
is not found." So I don't even make it to the point to check if the javascript is actually being executed because the file where it resides is never found. However, I'm pretty sure it works because putting the same code in the local file results in successful execution of putting "Hello" in the Dave div:
$("#dave").html('Hello');
I can't really put the code in the local file because this isn't the code I'm actually trying to run. But since this fails first, it has to be solved first.