By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,146 Members | 1,614 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,146 IT Pros & Developers. It's quick & easy.

Javascript menus not working

P: 4
I have put javascript menus on some of the navigation buttons on my website - they are supposed to load on mouseover. Before I uploaded the site, they appeared to work. On all of the navigation buttons I have js image swaps which also work on mouseover.
My problem is that the image swaps are working and the menus are not. I have tried removing the image swaps but the menus still don't work.
This is one of the pages in question: http://insheepsclothing.com.au/files/garments.htm

My computer - Mac OS10.3.9
browsers I've tried are firefox, opera & camino and I have also checked on some PCs using Internet Explorer.

Please help. This isn't urgent as I've added more navigation buttons to make up for the missing menus but I am perplexed as to what I've done wrong. Many thanks!
Aug 11 '07 #1
Share this Question
Share on Google+
4 Replies


pbmods
Expert 5K+
P: 5,821
Heya, Tassie. Welcome to TSDN!

You have a parse error on line 178.

Safari isn't the greatest for debugging JavaScript. My advice is to run the site in Firefox and check the error console.
Aug 11 '07 #2

P: 4
Thank you for such a fast response. I've run the site in Firefox which is my default browser. I've found the error console & now I'm totally distressed. I assume I have to fix the spacing on line 178 (and some other lines) but I don't know what to do. This is the error message......

Error: unterminated string literal
Source File: http://insheepsclothing.com.au/files/mm_menu.js
Line: 178, Column: 76
Source Code:
Expand|Select|Wrap|Line Numbers
  1.                 item = '<div style="text-align:' + menu.menuItemHAlign + ';">' + item + '</div>
I moved the [';] from the next line to no effect.

There are also other error messages that I don't understand

Error: this._windows[aWindow.__SSi] has no properties
Source File: file:///Applications/Firefox.app/Contents/MacOS/components/nsSessionStore.js
Line: 671

Error: uncaught exception: [Exception... "'[JavaScript Error: "this._windows[aWindow.__SSi] has no properties" {file: "file:///Applications/Firefox.app/Contents/MacOS/components/nsSessionStore.js" line: 671}]' when calling method: [nsISessionStore::getClosedTabCount]" nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)" location: "JS frame :: chrome://browser/content/browser.js :: PHM_toggleRecentlyClosedTabs :: line 6572" data: yes]

Any light that you can shed will be much appreciated and I'm very keen to learn. Thanks again.
Aug 12 '07 #3

pbmods
Expert 5K+
P: 5,821
Heya, Tassie.

The first error is easy; you're missing a quote mark.

JavaScript considers a newline to be a terminating character.

So unlike other languages, this is an illegal statement in javascript:
Expand|Select|Wrap|Line Numbers
  1. var str = "
  2. this
  3. string
  4. spans
  5. multiple
  6. lines
  7. ";
  8.  
Aug 12 '07 #4

P: 4
Thank you for your time and help - I've so much to learn.
Aug 13 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.