<script> ddaccordion.init({ headerclass: "expandable", ..... </script <li class="expandable"><%= link_to "institut", {:controller => "news"} %></li> i have an accordion navigation and the headers, which should expand on click, should link to my different sites.everything works fine, however, when the link_to method is nested in a tag where my shared css class, which javascript uses do locate my expandable headers, appears, the link doesn''t work any longer. i hope u can help me. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
gundestrup-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2008-Apr-18 10:32 UTC
Re: problems with link_to
try <%= link_to "institut", :controller => "news" %> <%= link_to "institut", :controller => "news", :action => "xxxx" %> (link to an action) <%= link_to "institut", :controller => "news", :action => "xxxx", :id => params[:id] %> (link to an action, with a specific ID (via the url) regards svend On Apr 18, 11:01 am, Claus Stachl <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> <script> > ddaccordion.init({ > headerclass: "expandable", > ..... > </script > > <li class="expandable"><%= link_to "institut", {:controller => "news"} > %></li> > > i have an accordion navigation and the headers, which should expand on > click, should link to my different sites.everything works fine, however, > when the link_to method is nested in a tag where my shared css class, > which javascript uses do locate my expandable headers, appears, the link > doesn''t work any longer. > > i hope u can help me. > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
not with that information. what does mean doesn''t work any longer? the link isn''t displayed? it''s displayed but does not react to clicks?> "when the link_to method is nested in a tag"what tag? how does the generated html output look like? are there any links? maybe it''s just a css problem... who knows? try to replace the link_to with a simple <a> tag, that links to "http://www.rubyonrails.org/" or something othe reliable... -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thorsten Mueller wrote:> not with that information. > > what does mean doesn''t work any longer? the link isn''t displayed? it''s > displayed but does not react to clicks?yeah. the link is displayed, but doesn''t work. if i change the class to any other css class (not used from javascript) everythings just fine. BUT i NEED to work with a shared class in this case.> "when the link_to method is nested in a tag" > what tag?<li class="sharedClass"><%= link_to "institut", {:controller => "news"}</li> ...doesn''t work <li><%= link_to "institut", {:controller => "news"}, :class => "sharedClass" %></li> ...doesn''t work <li class="anyOtherClass"><%= link_to "institut", {:controller => "news"}</li> ...works fine <li><%= link_to "institut", {:controller => "news"}, :class => "anyOtherClass" %></li> ...works fine> how does the generated html output look like? are there any links?yeah. the link is there, but doesn''t link to my view> maybe it''s just a css problem... who knows?i''m quite shure, cause i''ve tested every permutation with several css classes.> try to replace the link_to with a simple <a> tag, that links to > "http://www.rubyonrails.org/" or something othe reliable...that works but doesn''t give me the points, sorry i hope with this info u r able to help me? thanx so long. claus -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
now we''re missing the one thing: the CSS content for sharedClass since that''s obviously the source of the trouble> yeah. the link is there, but doesn''t link to my viewmeans? the link is there, the href is correct but doesn''t work (my guess) the link is there but the href points to nowhere? (can''t imagine that, since ling_to is very reliable) -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thorsten Mueller wrote:> now we''re missing the one thing: the CSS content for sharedClass > > since that''s obviously the source of the troublehere it is: .expandable { cursor: pointer; font-size: 1.5em; padding-left: 1.5em; }>> yeah. the link is there, but doesn''t link to my view > means? > the link is there, the href is correct but doesn''t work (my guess)--> no.> the link is there but the href points to nowhere? (can''t imagine that, > since ling_to is very reliable)--> yeah. the link is there, but doesn''t point to my view. i''m not able to imagine, what could be wrong. damn. thanx again for your help. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
DO THIS BRO : [Option 1] <%= link_to "<li class=''sharedClass''>institut</li>", {:controller => "news", :action => "xxx"} %> [Option 2] <li><%= link_to "institut", {:controller => "news", :action => "xxx"}, "class" => "sharedClass" %></li> What do you think? Enjoy, Reinhart http://teapoci.blogspot.com -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
... thus i''ve tried everything u wrote me. nothing worked. i think the problem is, what javascript does with this class. if somebody is interested in my problem: here s the link of the js source: <a href="http://stud3.tuwien.ac.at/~e0503876/igw_sketch/javascript/ddaccordion.js">js code</a> have a look at the init function on the end of the code. maybe u r able to find something..? greets claus -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
heres the working link: http://stud3.tuwien.ac.at/~e0503876/igw_sketch/javascript/ddaccordion.js -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---