Rails image link with javascript


#1

Is there a rails rhtml / tag to do something like this:

Button

Any ideas?

Thanks,


#2

Are the images necessary for this rollover? Have you considered
using CSS to achieve this effect?

-Derrick


#3

Unfortunately, yes … require the rollovers using the images.
Any ideas?


#4

I have 2 layouts xyz.rhtml and abc.rhtml. I have some common code in
common.rhtml.

I want to render common.rhtml in both xyz.rhtml and abc.rhtml.

Que 1. What is the best way in ror to do this?

Should I do the following in xyz.rhtml and abc.rhtml:


<%= render(:file => “common.rhtml”, :use_full_path =>
true)%>

Que 2. If answer to above question is yes, then is my usage is correct?
(Note: All three files are in app/views/layouts)

Currently when I do the above I get the following error:

ActionView::ActionViewError in Tracking#search_order

Showing /app/views/layouts/xyz.rhtml/ where line #20 raised:

|No rhtml, rxml, or delegate template found for common.rhtml|

Extracted source (around line #20):

|17:
18:
19:


20: <%= render(:file => “common.rhtml”)%>
21:

|

Thanks,


#5

On 1/13/06, Mufaddal K. removed_email_address@domain.invalid wrote:

   </div>

Thanks,

You might also try render_partial(’/common’), where common.rhtml is
moved to app/views/_common.rhtml

James