Sunday, November 29, 2009

[Rails] Views/index to views/show loses javascript functionality

I am testing a local copy of my website using Mongrel trying to
introduce a scriptaculous multi-level drop down menu. the menu is a
partial that is loaded into every layout I have many pages with their
individual layout file. When I jump from page to page(index to index)
all works OK. When I
jump from any "view/index" to "view/show" I lose the javascript and
the
drop down menu only works on the first level. Can anyone shed some
light
on why this happens and how I can solve it. In my layouts heads I have
the following:-
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<title>Blogpictures: <%= controller.action_name %></title>
<%= stylesheet_link_tag 'style' %>

<script src="javascripts/prototype.js" type="text/javascript"></
script>
<script src="javascripts/scriptaculous.js"
type="text/javascript"></script>
<script type='text/javascript' src='javascripts/menu.js'></script>
</head>
In the source html both index and show has exactly the same head
(except title)
I am using the control.js protype.js etc that came with the
scriptaculous download also using the latest versions of Ruby, Rails,
Gems etc
Gems etc.

--

You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate