Syndicate content

Drupal SimpleMenu & Javascript errors

Somehow, once in a while, I just don't get my navigation menu at the top of my screen.

I use the Drupal SimpleMenu module. It works in most cases, yet you have to make sure that your theme include the print $closure before the closing body tag. Something like this:

    ...
    <?php print $closure; ?>
  </body>
</html>

This will print the simplemenu variable. It is a Javascript variable used to create the menu. It is an array tree with all the menus and sub-menus and their corresponding label and URL. Simple stuff... The author uses SuperFish to get everything rendered.

Yet, once in a while, it just plainly breaks. That is, it just does not do anything. The menu does not apepar. I experienced that tonight again and I was wondering why would that be again?! I knew I had the problem before and solved it...

Some of the code on that site had some problems earlier. I fixed those and the menu was still not showing up. Bother!

Then at some point I clicked on my middle mouse button to open the FCKeditor setup in a different window. At the time I closed that new window (really, a tab in my browser) I noticed that the Simple Menu was showing up... So I reopened that window, went to several different pages, the menu is there, on every page! Found the solution!

So... what did happen? I think that because I had a Javascript error when I first opened that page, somehow, the browser kept in its brain this sticky idea that something's wrong and thus it cannot run Javascript on startup until fixed. But even reloads would not fix anything. Opening a new window or tab fixes the problem though.

Syndicate content

Diverse Realty

Diverse Realty Team

Want a New Home?
Want to Sell Your House?

Call Alex at
+1 (916)
220 6482

Alexis Wilke, Realtor
Salesperson
Lic. # 02024063

Cory Marcus, Broker
Lic. # 01079165

     

Terms of Site Index

Find the page/content you are looking for with our index.

  • Hoary
  • INTO

    An SQL keyword used right before the name of a table where data is to be inserted. It is used with the INSERT and the SELECT keywords.

  • database
  • policy
  • undefined