Reputation: 83
I have reviewed several responses to this matter however I can not find an error in my code.
button1.addEventListener('click',function(e)
{
pesquisa.open("POST","http://10.0.2.2/jobfinder/teste.php");
var params = {
pesquisa: box1.value
};
pesquisa.send(params);
});
Upvotes: 2
Views: 3397
Reputation: 11
Usually, the < SyntaxError > : Unexpected end of input... means that the function/code_expression or chunk code ended, while the parser expected that there was more - perhabs unclosed apostrophe (' or inserted mistakenly,eg scale's=. instead of scales=.), or unclosed bracket ")" or "}" or even a mispelt parameter name for a function being used.
I have used a function, and in the call in another code did not spell rightly one of the parameters, SD=p instead of sd=p used in the function. I got the error message too.
Upvotes: 0
Reputation: 12962
On Galaxy S3 with OS 4.1.2 the very same error was thrown (from line 1) when script at the end of file contained line commented with //
markup, as reported here: http://code.google.com/p/android/issues/detail?id=23437
Upvotes: 0
Reputation: 9
button1.addEventListener('click',function(e) )
{
you were missing a closing parenthesis after function(e)
Upvotes: 0
Reputation: 466
Vera,
Unexpected end of input error usually means there is a an unclosed parenthesis or bracket. Please post the full sample of code you are executing and I can find the problem for you.
Upvotes: 2