When checking on the checkbox i’m trying to create the div boxes and when unchecking remove it dynamically. I know with React i could do this in 2min but i’m trying to learn Vanilla JS way Current issues i’m having: When checking on checkbox it renders more elements than one When unchecking …
Tag: javascript
Access Messages from Message Center
Hi I’m try to display the top 5 messages from the message center on the homepage. But I’m not sure what I’m doing wrong. I try to get the messages from the message view model here is my code. View model MessageViewModel.cs Controller Cshtml Answer To display top 5 records, we should use the “OrderByDesc…
How do I insert emojis into a nickname in discord.js?
Every time I try to do that, the emoji just changes into a question mark. Here’s my code: Answer Your message variable in the above code is inconsistent. You used ‘msg’ to catch the return value but used ‘message’ to react. Keep it consistent, otherwise, you might face errors. Al…
Why is this promise returning undefined?
I am trying to write a simple function like this and I have made a firebase helper like this however, league is logging out as undefined and in here is logging out second. however, I thought it would be the other way around? I thought it would “await” for this function to resolve then once it̵…
How to fetch full row associated with a column which is selected in dropdown list?
I have made a dropdown list which fetches data (name) from database and displays in options of dropdown list. Now I am trying to fetch full row of that selected name from the list and want to save each data into a variable for further usage. Can anyone guide me… This is my first project in PHP/MySQL, pl…
Unexpected unhandledRejection event for promise which rejection does get handled
Updated, I’ve now tried explaining the behavior I’m seeing, but it’d still be great to have an answer from a credible source about the unhandledRejection behavor. I’ve also started a discussion thread on Reddit. Why do I get an unhandledRejection event (for “error f1”) in t…
Setting up an .active class to a dynamically created link JS
I built a navbar a few weeks back and just realised I did not set an .active class on it. Now, I built the navbar and the links dynamically in JS and would now like to give whichever one is active the according CSS. This is how I built the navbar in JS: I have more than one link, but
Discord.JS How to wait for member reaction
I am making bot to manage my multiple Discord guilds. And I’d like to make confirmation system, like: User does X thing, Bot sends message in sufficient channel, Bot waits for user to react with :thumbdsup: or :thumbsdown: up to 60 seconds If thumbs up, do A, else – do B. If time is up, do C actio…
Variable in JavaScript with firebase
I am creating a simple polling website using HTML & JavaScript (through Glitch) and also Firebase, I followed a tutorial to do it. I have it all working and the voting works fine and displays the results as intended. I now want to take the results and use them to display a chart on my HTML page. I underst…
Component vue-multiselect- doesn’t fetch value on load
When loading a component, I need to select the value in the drop-down list I’m trying to make my code friends with vue-multiselect found a similar topic – however, nothing appears in the field – if you then select a value, everything works correctly link in fact, I have to download via axios…