Error Missing After Property List Source File
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up missing } after property list up vote 4 down vote favorite I am trying to implement a content slider using jQuery in one of my website; however I keep getting this error: missing } after property list Here is my code: When I click on view source in Firefox I found that the last curly bracket is missing but in the file the code is fine, and using firebug debug console I got this error: missing } after property list I tried many things, searched for missing commas, eliminate most of the lines but could not find the source of the problem. EDIT: Firebug points to this line: }); as the one with error. I just checked the script in IE8, Chrome and firefox and in all of the three broweser i get the code like this: I also tried to write one line only like so: featuredcontentslider.init({ id: 'slider1' }); and still ended up with the same error. In localhost the script works fine, however in the actual website the script is functioning correctly. I am wondering is there a possibility that other js code in the page might affect the behaviour of this one? javascript jquery json share|improve this question edited Jan 18 '11 at 17:07 meagar♦ 136k21203237 asked Jan 18 '11 at 16:51 khr2003 3823621 2 Why is the last curly brace missing? –SLaks Jan 18 '11 at 16:52 The bracket shouldn't be just missing from the viewsource of firefox. –Dogbert Jan 18 '11 at 16:54 1 @Slaks that is the actual question –amosrivera Jan 18 '11 at 16:55 4 Try removing all white space between the (). If you copy/pasted this code, sometimes an invalid invisible character can find its way in and wrea
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up SyntaxError: missing } after property list jquery [closed] up vote -2 down vote favorite My jQuery code was http://stackoverflow.com/questions/4726686/missing-after-property-list working fine before. But now it is giving error SyntaxError: missing } after property list jquery I have seen so many questions on SO and checked my code so many times but unnable to find error so please help me to find error in following code. $("#savedata").click(function () { var var1 = $('#email').val(); var var2 = $('#password').val(); var var3 = $('#name').val(); var var4 = $('#organization').val(); $.ajax({ type: "POST", url: "savedata", data: { http://stackoverflow.com/questions/15461451/syntaxerror-missing-after-property-list-jquery var1: var1, var2: var2, var3: var3, var4: var4 }, success: function (resp) { alert('Registration Successful'); } }); return false; }); Thanks in advance jquery share|improve this question edited Mar 19 '13 at 21:47 thaJeztah 11.1k41743 asked Mar 17 '13 at 13:47 عثمان غني 1,36812557 closed as too localized by Rob W, Claudio Redi, unlucky13, Soner Gönül, Gordon Mar 17 '13 at 14:10 This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question. add a comment| 1 Answer 1 active oldest votes up vote 6 down vote accepted So, you have a lot of typo. The right syntax is : $("#savedata").click(function () { var var1 = $('#email').val(); var var2 = $('#password').val(); var var3 = $('#name').val(); var var4 = $('#organization').val(); $.ajax({ type: "POST", url: "savedata", data: { var1: var1, var2: var2, var3: var3, var4: var4 }, success: function (resp) { alert('Registration Successful'); } }); return false; }); share|improve this answer answered Mar 17 '13 at 13:50 sdespont
to Functions in JS Forum View Course » View Exercise 306 points Submitted by prospero168 over 3 years ago 01 SyntaxError: missing ) after argument https://www.codecademy.com/en/forum_questions/51c9cebb8c1ccce33800295d list Console.log Problem I am working on the first problem and I http://unethicalblogger.com/2008/03/21/javascript-wonks-missing-after-property-id.html am not sure what I need to do in order to make it work. Here is my code. var balance = 20.97; // Complete the condition in the ()s on line 4 if (balance < 10) { // console.log() the balance minus 5 dollars console.log(balance-5) error missing } else { console.log (print balance) // Just console.log() the balance console.log(print balance) } 1 vote permalink Hello there, I'm not sure if you have solved it. It is always better if you also give us the exact error you are getting. It helps isolating the problem. 1- Looking at your code I see a missing semicolon after -5); 2- Also I error missing after would separate it as (balance - 5); so it doesn't look like one word. 3- Console.log(balance) doesn't need a print key word since console.log means print to screen. Just keep balance by itself. 4- Is that last console.log a repeat? I think so and it should be removed since it may give you an error. 2933 points Submitted by tony de araujo over 3 years ago 2 Comments prospero168 over 3 years ago Thank you for your assistance. Here is the error that I received "SyntaxError: syntax error" and it said "Oops, try again! Your code doesn't look quite right. Check the Hint if you need help!" Do you have any other suggestions? tony de araujo over 3 years ago When it says "your code doesn't look right" it could be anything. Did you make the changes I wrote about? if so and if you still have a problem, try posting your code again (on the bigger text box). 0 votes permalink Here is an updated version of my code. var balance = 20.97; // Complete the condition in the ()s on surely running into a myriad of browser-specific quirks along with a few cross-browser gems that have left me thinking about putting some browser developers on my "To Anonymously Beat Up In Alleyway" list (so far, James Gosling, and this man top the list). After working on a few "classes" tonight (the notion that Javascript is object-oriented still makes me chuckle) I ran into an interesting problem with some of my global-level "constants" defined in the same file that I was working in, that my "class" just so happened to make use of. As I tend to do when I fall into situations like this to where I can't tell if I'm hallucinating or if something with Javascript has gone awry, I called over Sergio (in-house CSS master and Javascript Lvl. 60 Mage). Some background to how Javascript works Javascript engines essentially have two "modes" that it runs over your code that you can spot errors in. The first mode, "parsing", is where you'll find syntax errors spewing into the Javascript console. If you've used any interpreted language before (Python, Java, C#, Ruby), this is really just "compilation". Using Python as an example, when you import a module (i.e. import some_module) the Python interpreter actually compiles your code into Python byte-code to be executed at a later date. The second mode, "execution", is where you'll run into your run-time errors, using an accessing an undefined object property, overrunning an array index, etc. In Python/Java terms, this is where your compiled byte-code is actually being run in the Python/Java virtual machine. The gripe The crux of the problem comes down to two different ways to declare an associative array in Javascript, the following two notations are both correct and both "work": Notation #1
var mapped_values = {};
mapped_values['key'] = 'value';
Notation #2
var mapped_values = {'key' : 'value'};
Everything looks correct yes? (hint: say yes) Incor