Results 1 to 2 of 2

Thread: Chrome CSS menu and Rails

  1. #1
    Join Date
    Dec 2007
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Chrome CSS menu and Rails

    1) Script Title: Chrome CSS Drop Down Menu

    2) Script URL (on DD): http://dynamicdrive.com/dynamicindex1/chrome/index.htm

    3) Describe problem:

    I have an existing website (http://rodneyandtina.com/rodney/nana) that uses the Chrome CSS menu successfully, but I am having difficulty integrating the menu with a new Rails app that I just added to the website. (The 4th menu, the Guestbook, is the new Rails app.) The problem occurs whenever there is a dropdown menu, which is reflected in this example:
    <a href="#" rel="dropmenu1" >Menu1</a>

    When I am in the Rails app, it simply appends the "#" to the end of the Rails path (in my case I get "http://rodneyandtina.com/railsnana/submit/new#") and it tries to go there. In order to workaround the problem somewhat, I've replaced the "#" with a static link, but this is not how I want the site to work, obviously.

    Does anyone have any ideas on how to fix this behavior? This is only my second Rails app and I've never used the "rel" attribute of the "a" tag, so I'm a little bit stuck. Any help would be appreciated.

    Thanks,
    Tina

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    I'm not sure I entirely understand what the question is. If you're wondering why the menu doesn't work on, say, this page, it's because with the "dummy" URL generated, the relative reference to chrome.js is no longer valid inside the page:

    Code:
    <script type="text/javascript" src="chromejs/chrome.js">
    This can be fixed by changing the reference to it to absolute:

    Code:
    <script type="text/javascript" src="http://www.mysite.com/chromejs/chrome.js">
    Obviously make sure the absolute URL to chrome.js is correct.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •