473,669 Members | 2,457 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

IE JScript Error "Expected Identifier"; What does it actually mean?

1 New Member
I'm new to jquery, and hoping it will make my client side coding more friendly (particularly with regards to ie).
As is usually the case, I've got some code that works nicely in ff, but kicks out an "Expected Identifier" error.
So, I've got two questions:
  1. What exactly does that mean? What is an "Identifier ," particularly within the context of Internet Explorer and JScript?
  2. Why am I getting it? The code that is producing the error is below:
Expand|Select|Wrap|Line Numbers
  1. $.getJSON('pages.json.php', function(data) {
  2.         var myLive = " ";
  3.         var myDelete = " ";
  4.         var html = "";
  5.         for (var i=0; i<data.sections.length; i++) {
  6.  
  7.             if (!data.sections[i].golive.length) {
  8.  
  9.             } else {
  10.                 myLive = '<a href="#" onclick="$(\'#';
  11.                 // Code breaks on the above line
  12.                 ...
  13.             }
  14.             ...
  15.         }
  16.         ...
  17. });
  18.  
The above code is part of an anonymous function that gets called by $.getJSON('.... ', function(data){ ...}). I do declare myLive as local within that function: var myLive = "&nbsp;";
May 19 '10 #1
1 3670
Plater
7,872 Recognized Expert Expert
It looks like you're doing some funky quotations there.
myLive = '<a href="#" onclick="$(\'#' ;
I cannot even figure out what you are shooting for with that string.
May 20 '10 #2

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

Similar topics

6
6630
by: craigbeanhead | last post by:
Hi, I'm teaching myself C from K&R2. I've come across something that I really don't understand. When I try to compile the following code (in VC++7), I get an "undeclared identifier" error. When I move the second integer declaration to the beginning of the function, it compiles and runs correctly. I'm sure I read that you could declare a variable anywhere in a code block, as long as you don't attempt to use it *before* the declaration....
6
2056
by: Jim H | last post by:
I have an app I working on that was working fine a few days ago. Now I get a jscript error: Microsoft JScript runtime error: Object expected in a part of the code that has not been modifed or touched. It's actually part of a separate project. I only get this error when I try to view the page on my local machine. If I connect to my webserver from another machine it works fine. What can cause this? Why does it only fail on my local...
11
44232
by: westplastic | last post by:
This one is driving me insane. The script works perfect on Firefox, but Internet Explorer keeps complaining about "Error Object Expected" and stuff like that. I've run it through Firefox's Java Console, and it comes back with no errors. Any pointers on this, would be much appreciated. <script type="text/javascript"> <!-- var p = new Array(0,0,0,0,0) var c = new Array(0,0,0,0,0,0,0,0,0)
7
12879
by: Tony Tone | last post by:
I am having trouble resolving this issue: Server Error in '/test' Application. -------------------------------------------------------------------------------- Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
6
42509
by: thistleryver | last post by:
I thought it meant that I hadn't declared a variable but I have. int DoubleNumbers(int seq, int *digitNum) { int i, j; for (i = 0; i = 9; i++) for (j = i + 1; j = 9; j++) if (seq == seq){
13
27420
by: hn.ft.pris | last post by:
Hi: I have the following simple program: #include<iostream> using namespace std; int main(int argc, char* argv){ const double L = 1.234; const int T = static_cast<const int>(L); int arr;
8
2731
by: trappedIntoCode | last post by:
Hi Everyone, Here is a part of javascript code that works well in FF2 but shows above error in IE6 and error "missing name after . operator" . function PopUp(idf,stepX,stepY,speed){ this.idf=idf; this.popXStep=stepX; this.popYStep=stepY; this.popSpeed=speed; this.popLeft=0;
4
44480
by: CodeTilYaDrop | last post by:
I am still pretty new to programming, and I sometimes can not figure something out. I am getting an error with this line in my program: Public void count_syllables(int count_syllables) I get the error <identifier expected>. What does this mean. I can not seem to make it go away!?
9
11183
by: Rohit | last post by:
I am trying to initialize an array whose initializers depend on value of Enums. I take enum and then decide the initializer value, so that even if enum value changes because of addition to list even then I should be able to get correct value for the array element. I need value and state to be present in a single byte thats why I use macros. Here is what my code look like: typedef enum
5
45059
by: nina01 | last post by:
Hi! I'm working on a mini compiler with flex and bison. The ".l" and ".y" files are generated successfully. However, when I try to compile the hole thing using the command "gcc -o comp comp.tab.c lex.yy.c ", I keep having this error :-( In file included from comp.l:4: comp.tab.h:56: error: expected identifier before ‘(’ token It's supposed to be a syntax error but I honestly don't know where does it come from knowing that the file...
0
8383
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8894
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8803
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7407
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5682
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4384
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2792
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2029
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1787
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.