Reputation: 720
Here is the code in my application.js file:
this.change(function() {
$.post("dvbd", {id: this.val()}, null, "script");
});
Here is what is in dvbd.js.erb:
$("#dave").html(:id);
What I'm trying to do is when this
changes, the dave div has the value of this
as its html. So I guess my question is how would I use the data sent using .post in my js.erb file?
Upvotes: 0
Views: 97