Solved

Error: Expected identifier, string, or number

Posted on 2008-10-22
4
3,296 Views
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
Line:11
Char:2
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"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<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"> 
	    $(document).ready(function(){ 
	        $(document).pngFix(); 
	    }); 
	</script>	
 
	<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

0
Comment
Question by:walker6o9
4 Comments
 
LVL 44

Expert Comment

by:scrathcyboy
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.
0
 
LVL 11

Accepted Solution

by:
MacAnthony earned 500 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?
0
 

Expert Comment

by:pat1999
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.
0
 
LVL 1

Author Comment

by:walker6o9
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.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Introduction Got endorsements from your clients?  Great!  There is almost nothing better than word-of-mouth advertising.  But how can you do that on the internet?  Sure you can make a page for endorsement quotations and list them all, but who is …
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 how to dynamically set the form action using jQuery.
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)

803 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