1

I am trying to call a function "makeQuery" and it's not working, FireBug is telling me:

missing ; before statement
[Break on this error] makeQuery(this.id){\n

I don't quite understand where it wants me to put the ";"

$(".predicate").click(function () {
    makeQuery(this.id){
    alert(this.id);
    }
});

function makeQuery(value){
    queryString = queryString+"val="+value+"&";
    variables = variables+1;
    alert(queryString);
    alert(variables);           
}

2 Answers 2

3

replace

makeQuery(this.id){
alert(this.id);
}

with

makeQuery(this.id);
alert(this.id);
Sign up to request clarification or add additional context in comments.

Comments

0

You have an extra curly brackets at wrapping the alert which doesn't make sense:

makeQuery(this.id){\

Should be:

$(".predicate").click(function () { 
    makeQuery(this.id);
    alert(this.id);      
}); 

The makeQuery requires the ; since you are calling a function.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.