Warnings with KitchenSink Search Events?
Alright so here's the code:
// SEARCH BAR EVENTS
search.addEventListener('change', function(e)
{
e.value;
});
search.addEventListener('return', function(e)
{
e.value;
search.blur();
});
search.addEventListener('cancel', function(e)
{
search.blur();
});
And here are the warnings in the console:
[WARN] JavaScript compiler reported "Expected an assignment or function call and instead saw an expression." at main/search.js:473
[WARN] JavaScript compiler reported "Expected an assignment or function call and instead saw an expression." at main/search.js:477
Anybody know what the problem is? I know it's the two "e.value;"s, but I have no idea how to fix it and those two warnings are really getting annoying (I enjoy seeing all blue in the Titanium console!)
3 Answers
-
Accepted Answer
Try this:
// SEARCH BAR EVENTS search.addEventListener('change', function(e) { return e.value; }); search.addEventListener('return', function(e) { search.blur(); }); search.addEventListener('cancel', function(e) { search.blur(); });
-
Bump
-
assign e.value to some variable & make that variable use as u needed in ur code
…varun