SyntaxError: invalid label

Hello It took hours now and I don't have a clue whats going on here. I always get the following error, when i send the ajax request with jquery 1.8:

"SyntaxError: invalid label"

This is my code...

        $(document).ready(function() {

    $("#create-workspace-button").click(function () {
    $("#submit-create-workspace").live("click", function(event){
        category= $("#id_workspace_category").val();
        var json_data = JSON.stringify({

            headers: {
                'X-CSRFToken': $("input[name=csrfmiddlewaretoken]").val()

            url: '/workspace/create/',
            success: function(data) {

            error: function(jqXHR, textStatus, errorThrown)
                //here a label error happens...i dont know why


    $("#close").click(function () {

    function close_dialog(thiz){
    function show_dialog(thiz){

        $('#layer,.form-submit-dialogbox, #close').fadeIn();

edit "JSON.stringify(" was missed out...but same error


Are you asking about a syntax error or a reference error? You've edited the code but not the title...

Your reference error could be because you're referring to the global console object, which in some browsers only exists when the console is open.

Your syntax error could be because of the extra closing parenthesis ) at the very end of your code, but without seeing the wider context it's hard to tell.

Need Your Help

background switch page load

jquery background switch-statement

I've seen a lot of different background switching based upon link classes, however I just want a simple background switcher on any page load (no cookies) and not link dependent.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.