Displaying 2 results from an estimated 2 matches for "comment_error".
2006 Apr 05
23
how to create RJS visual effects callbacks
...to no avail What I''m trying to do is fade an image, change
the div with the image to a new image, and then fade the new image back
in. How would I go about this in RJS Here''s a simple line from my rjs
that I can''t get to work. It is not using callbacks so the
"comment_error" div is being replaced before the fade out. I can''t find
any documentation on the subject.
page.visual_effect :fade, ''comment_error'', :duration => 0.5
page.replace_html ''comment_error'', "#{error_messages_for(''comment'')...
2006 Mar 27
7
rjs template ? (how to check for existence of a dom element?
In my rjs template I''m using the following line.
page.visual_effect :slideUp, ''comment_error_details'', :duration => 0.5
It works fine if I have created the div with the
id="comment_error_details",
but if I haven''t created the error yet then my whole rjs template fails.
How can I check to see if an element has been created? I could then put
the above li...