Mixing a call to .rhtml AND .rjs

Hi

I’ll admit that I’m being lazy and trying to avoid learning enough
javascript to implement this in Script.aculo.us, but if I have to I
will.

If I don’t then someone will have answered this question I have. :wink:

I have an .rhtml being rendered but I want to also ‘flash’ a


element on the screen that matches a criteria, this page is NOT being
updated via ajax.

Any clue?

thanks.

I’m not sure I have enough information about what you are trying to do,
but do you mean that you want to put flash data into a div if certain
criteria is true at the time the page is rendered? If so, you could just
do this in your .rhtml file:

<% if condition -%>

<%= flash[:error] -%>
<% end -%> ...

If you are wanting to do something after the page is rendered based on
user interaction, that would need to be done w/ javascript.

-Bill

Jean N. wrote:

updated via ajax.

Any clue?

thanks.


Sincerely,

William P.

I think what you want to do is this:

Watch me highlight!

cheers

Ivor

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs