View Single Post
Old 12-04-2008, 03:18 PM   #6 (permalink)
sketchMedia
The Prestige
Advanced Programmer Top Contributor Good Samaritan 
 
sketchMedia's Avatar
 
Join Date: Oct 2007
Location: Manchester, UK
Posts: 854
Thanks: 32
sketchMedia is on a distinguished road
Default

I think it has more to do with the fact that you are using an object literal, yet are still trying to assign variables in a normal fashion.
javascript Code:
obj = {
    var test = '';
    var test2 = '';
}
is incorrect, this is the correct way and looks similar to the methods:
javascript Code:
obj = {
    test : '',
    test2 : '',
}
Basically (looking at the error from your site currently) JS is trying to interpret 'var' as a property of the object, then it will look for ':' to assign a value to it but it cant find it. Also you don't assign properties with values in that way, you assign them like functions (in theory you are with methods, assigning an anonymous function to a object property) also the comma at the end is important too.
__________________
mysql> SELECT * FROM `users` WHERE `users`.`clue` > 0;
Empty set (0.00 sec)

Last edited by sketchMedia : 12-04-2008 at 03:21 PM. Reason: oops
sketchMedia is offline  
Reply With Quote