Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Error: Expected identifier, string, or number

Posted on 2008-10-22
Medium Priority
Last Modified: 2012-06-27
I'm using a jquery function to create drop down menu.  It works great, expect that in IE7 is gives me an error
Error: Expected identifier, string, or number
Code: 0

The site still works fine, including the drop down menu, and this error only shows up the first time you go to the site.  If you refresh, it no longer shows up.

I've read that this often occurs if there is an extra comma, semi-colon, or parenthesis, but I'm not a javascript wiz, and I can't seem to find any unnecessary code that would cause this.

If you know what is causing my bug or can find in my code, I would be almost grateful to you as I would be if you were throw the people responsible for IE6 and 7 in prison.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
	<link href='http://clearwaterpaper.com/' rel='home' title='Clearwater Paper'/>
	<meta content='index,follow' name='robots'/>
	<meta name="keywords" content="potlatch" />
	<meta name="description" content="This is what will show up in search engine results as the description of the site" />
	<meta name="author" content="Clearwater Paper" />
	<script src="http://jqueryjs.googlecode.com/files/jquery-1.2.6.js" type="text/javascript" charset="utf-8"></script>
	<script src="/assets/scripts/jquerycssmenu.js" type="text/javascript" charset="utf-8"></script>
	<script src="/assets/scripts/init.js" type="text/javascript" charset="utf-8"></script>
	<script src="/assets/scripts/jquery.preload-min.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript" src="/assets/scripts/jquery.pngFix.js"></script> 
	<script type="text/javascript"> 
	<link rel="stylesheet" href="/assets/css/main-styles.css" type="text/css" media="screen" />
	<link rel="stylesheet" href="/assets/css/print-styles.css" type="text/css" media="print" />
<!--[if IE]><link rel="stylesheet" href="/assets/css/ie-style.css" media="screen" type="text/css" /><![endif]-->
<!--[if IE 6]><link rel="stylesheet" href="/assets/css/ie6-style.css" media="screen" type="text/css" /><![endif]-->
	<!-- Analytics -->

Open in new window

Question by:walker6o9
LVL 44

Expert Comment

ID: 22782404
You list no *working* link to your site javascript, which is where the error is coming from --  So how can we  debug it for you?  Use Firefox, run the error console, it will show where the errors are.
LVL 11

Accepted Solution

MacAnthony earned 2000 total points
ID: 22782413
I'm guessing it's an issue from one of the linked javascript files and not this page specifically as there doesn't appear to be any errors. Does it give a filename?

Expert Comment

ID: 22962175
I ahve an issue with java script menu. It gives error "
Line: 102
Char : 20
Error: Expected Identifier

Here is the website URL
http://www.ibsgroupinc.com/  When you open load the page, everything is fine.
As soon as you use the drop down menu and pick the link, I see Error "at the bottom left corner of Internet Explorer". It states that "Done, but with erros on page".  It happens to all pages when I open the page using the menu. Can you help? I am attaching webpage code.

Author Comment

ID: 22962566
My problem was that I was using pngFix.  If you are using pngFix, let me know and I can help you.  If not, I'm afraid I cannot help you.

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

569 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question