search for: color_show

Displaying 1 result from an estimated 1 matches for "color_show".

2006 Sep 06
2
RJS Javascript oddity - trying to call Element.setStyle
Hi all, I have a really simple web page. Right now, it''s just a button and a square div. What I want to do is to change the background color of the div to red when the button is clicked. My form code looks like this: <%= form_remote_tag :url => {:action => ''color_show''} %> color_show.rjs looks like this: page << "Element.setStyle(''show_color'', {backgroundColor: ''blue''})" When I click the button, the page elements go away and I just get this screen of text: try { Element.setStyle(''show_c...