The Disintegrator
The Disintegrator

Reputation: 4187

Netbeans + jquery = error

I'm working in a php project and Netbeans insists on marking lines like

        $.get("/adminc/utilsAjax.php", { function: "orderIsOpenOrClosed", orderID: orderID, rand: randn }, function(data)

and the closings

        });

As errors

I tried using the non minifierd version of jquery and no change.
It's like Netbeans ignores the jquery syntax.
Any ideas?

Upvotes: 0

Views: 358

Answers (3)

prodigitalson
prodigitalson

Reputation: 60403

As Bodman Said, function is a reserved word so you need to quote that. But you may also need to quote all the hash keys for netbeans to interpret them correctly for example:

    $.get("/adminc/utilsAjax.php", {
        "function": "orderIsOpenOrClosed", 
        "orderID": orderID, 
        "rand": randn 
      }, 
      function(data){
        // fun body
    });

Upvotes: 1

Bodman
Bodman

Reputation: 8046

The "function" is a reserved word, and in object notation may require quotes, Netbeans is expecting () after the Function key word.

Upvotes: 4

emco
emco

Reputation: 4709

You have missed a { after function(data)

Upvotes: 0

Related Questions