ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Javascript dropdown menu issue

July 07, 2008 11:33pm

Subscribe [2]
  • #1 / Jul 07, 2008 11:33pm

    Natty P

    4 posts

    I have a client who has a static site that I am upgrading to EE.  There is a menu system running on external javascript files which I have uploaded on the root.  I can access them fine in the index file but whenever I try to add the menu javascript to other templates ie. about us, contact us and so on it will not appear.  I know why it’s not working but I cannot find a solution to deal with this.  I need to point back to the root somehow, it is quite possible that I have overlooked something and I am blind.

    <scr!pt language=“JavaScript1.2” type=“text/javascript” src=“HM_Loader.js”></scr!pt>

    Above is fine in index file but not in other templates.

    please help me

    Cheers

  • #2 / Jul 08, 2008 9:50am

    Andy Harris

    958 posts

    Try this:

    <scrrrrrrript type="text/javascript" src="/HM_Loader.js"></scrrrrrrrrrript>

    Incidentally, check out Superfish. Lovely jQuery plugin for drop down menus.

  • #3 / Jul 09, 2008 12:43am

    Natty P

    4 posts

    I’ve tried the script line from above with no change.  This is a weird one cause I feel like I need to put the absolute path to the js files, I tried it but no change it just isn’t working.  I am getting the same with jQuery too.  Is there something that I have done wrong here in the setup of the templates?  It’s because the pathway to the template page is /index.php/siteName/about_us/ and it wants to read the js the /about_us/ but ofcourse it is sitting on the root of the site.

    MMmmmm any more ideas?

    Cheers

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases