开发者

missing } after property list

开发者 https://www.devze.com 2023-01-22 12:13 出处:网络
I know this is something easy but I just can\'t see it. Can anyone tell me why I am getting the error \"missing } after property list\" for the following code:

I know this is something easy but I just can't see it. Can anyone tell me why I am getting the error "missing } after property list" for the following code:

var $newCandleDialog = $('<div></div>')
        .load('/prodash/dash_access.php?urlInit=candles/getCanStatus.php','it='+newData)
        .dialog({
            autoOpen: false,
            title: 'Active Mode: New Candles!',
            modal: true,
            buttons: {
                "Load new candles": function() {
                    $("#canHint").load('/prodash/dash_access.php?urlInit=candles/getcandles.php','q=0&show=05&strength=00');
                    $( this开发者_如何学编程 ).dialog( "close" );    
                }
                Cancel: function() {
                    $( this ).dialog( "close" );
                }
            }
        });

Firebug starts the error with the "Cancel: function" line.

Thank you in advance!


You are missing a , before Cancel:.

JSlint is very good at detecting stuff like this.


You need a comma between each key/value pair.

{
    foo: { },
    bar: { }
}

You don't have one between the value for the buttons property and the key for the Cancel property.

0

精彩评论

暂无评论...
验证码 换一张
取 消