Open GXBlary opened 6 years ago
In your case issue is happening because you defined an event as e
and then using it as event
. This code should work for you:
$("#mainSearchInput").on("awesomplete-selectcomplete", function(e){
sendTags(e.text.value);
});
Also you can bind to the event with vanilla JS (without jquery) like that:
document.getElementById('mainSearchInput').addEventListener("awesomplete-selectcomplete", function(event) {
sendTags( event.text.value );
});
Thank you so much! Your vanilla JS works like a charm.
First, thanks for your great work!
I used the examples I found here to build an alternative to the advanced search form on my site/database. Everytime a new "tag" is selected in the search input, I fire a function [sendTags()] which fills the advanced search form properly then queries the database (so the advanced search form is the only true interface to my database query script).
Here is the code
This works on Chrome 64, but on Firefox 58 I get the following error
I tried to replace
By
But it still doesn't work on Firefox
Can someone give me some tips so I can solve this problem?
Thanks a lot!