Solved

Error: Expected identifier, string, or number

Posted on 2008-10-22
4
3,290 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

In this article you'll learn how to use Ajax calls within your CodeIgniter application. To explain this, I'll illustrate how to implement a simple contact form to allow visitors to send you an email through your web site.
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
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)

863 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now