HTML Code which calls a function on a level select event. This code is written in Ember framework.
{{ action "onLevelSelect" this on="change" target= "view"}}
Javascript function which is called by triggering this event:
onLevelSelect : function(event) {
var getSelectedLevel = event.target.selectedOptions[0].label; // error line
/*rest of the code goes below*/
}
When it comes to "error line", i m getting this error.
"ReferenceError: event is not defined".
I have tried window.event and event.which and i also tried by sending event explicitly to the function "onLevelSelect".
I solved this problem but forgot to update. The Solution is
Firefox doesn't support the ember handlebar syntax to handle events like Click, Change etc. But it works in Chrome. So, I used jQuery functions to handle these events like click(event){}, change(event){}, etc.(we can also use HTML functions like onClick(), onChange()) .
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With