PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

How to resolve confilct with MooTools on search page?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to resolve confilct with MooTools on search page?

    I'm trying to modify the search template to fall in line with the look of my website and I've got a conflict when I include a call to a MooTools script called Menumatic which is a js to render my main menu. Firebug shows an error with Menumatic and the menu doesn't display at all. Following is the code I've added to the bottom of the <body> tag in search_template.html which controls the rendering of the menu:

    Code:
    <script src="http://www.google.com/jsapi"></script>
    <script>google.load("mootools", "1.2.1");</script>
    <script src="../js/MenuMatic_h_0.68.3.js" type="text/javascript" charset="utf-8"></script>
    	
    	<script type="text/javascript" >
    		window.addEvent('domready', function() {			
    			var myMenu = new MenuMatic();			
    		});		
    	</script>
    This controls the menu in my banner and I really do need it. I'm pretty much a noob with javascript so I have no idea what I need to change to get it to work. Any suggestions?

  • #2
    I've got a conflict...
    A conflict with what? The search_template.html file is a standard HTML file. So there should be no reason what Javascript shouldn't work.

    What was the error message you got?

    Is this page live on the web somewhere where we can have a look at it.

    We have never heard of MooTools nor Menumatic. So we aren't in the best position to debug it for you. Have you tried contacting MooTools?

    Comment


    • #3
      MooTools is a js framework like jquery or prototype. My site uses a js menu whose presentation is handled by Menumatic, a plugin, which was designed using MooTools.

      At any rate, I figured out the problem. I forgot that the template is nested down one level and I forgot to set my file path on the script to go back up a level.

      Another question, though, why won't includes work in the template, like:

      <!--#include file="includes/menu.html" -->

      A link to the search page with that bit in case you want to look: http://southernmatthews.com/search/search.php

      Comment


      • #4
        Originally posted by gmatthews View Post
        Another question, though, why won't includes work in the template, like:

        <!--#include file="includes/menu.html" -->
        See this FAQ about using SSI (server side includes) on the template page:
        Q. How can I add headers & footers to the search template using SSIs or scripts?

        Basically, it doesn't get parsed by the server (because it gets parsed by the search.php script instead). So you have to follow the abovementioned method.
        --Ray
        Wrensoft Web Software
        Sydney, Australia
        Zoom Search Engine

        Comment

        Working...
        X