Problems with link_to

ddaccordion.init({ headerclass: "expandable", ..... </script
  • <%= link_to "institut", {:controller => "news"} %>
  • 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.

    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 tag, that links to
    http://www.rubyonrails.org/” or something othe reliable…

    Thorsten M. 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?

  • <%= link_to "institut", {:controller => "news"}
  • ...doesn't work
  • <%= link_to "institut", {:controller => "news"}, :class => "sharedClass" %>
  • ...doesn't work
  • <%= link_to "institut", {:controller => "news"}
  • ...works fine
  • <%= link_to "institut", {:controller => "news"}, :class => "anyOtherClass" %>
  • ...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 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

    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 view
    means?
    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)

    Thorsten M. wrote:

    now we’re missing the one thing: the CSS content for sharedClass

    since that’s obviously the source of the trouble

    here 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.

    DO THIS BRO :

    [Option 1]
    <%= link_to “

  • institut
  • ”, {:controller =>
    “news”, :action => “xxx”} %>

    [Option 2]

  • <%= link_to "institut", {:controller => "news", :action => "xxx"}, "class" => "sharedClass" %>
  • What do you think?

    Enjoy,
    Reinhart
    http://teapoci.blogspot.com

    … 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:

    js
    code

    have a look at the init function on the end of the code. maybe u r able
    to find something…?

    greets claus

    heres the working link:

    http://stud3.tuwien.ac.at/~e0503876/igw_sketch/javascript/ddaccordion.js

    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 S. [email protected]

    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