Ajax and Rails

Hi Matthew,

Matthew Lagace wrote:

I have been trying to use ajax and rails for a drop down list and I can't seem to get it to work.

What do you mean 'can't seem to get it to work'? What is it doing / not doing. Where's the relevant code? We can't help much without more info.

Bill

Matthew Lagace wrote:

Sorry hehe, well when I click on the item I want, I tried to put an observer on the select id="mediaType",

Is the observer firing? What do you see in Firebug when you click an item?

then i wanted to put in my RJS template something like if page[:mediaType][:value] = 'Game'

What is this? Is this how you're trying to get the value returned when the user makes a selection? Cause it ain't the way to do it. Post the relevant code from the view that generates the request, the controller method that gets invoked, and the RJS template. Then we can give you some guidance.

Have you worked with RJS before? If not, I highly recommend Cody Fauser's PDF at O'Reilly: "RJS Templates". It's $10 you'll be glad you spent.

Best regards, Bill

Hi Matthew,

No offense intended, but after seeing your code I think you ought to work through a basic tutorial or two to get your arms around Rails' basics before you tackle RJS. The cookbook tutorial at O'Reilly that Curt and I did is pretty much up to date. It's at Radar – O’Reilly

Best regards, Bill