I’m implementing a global confirm dialog feature. For example: The confirm dialog will open when a user clicks a “publish” button to publish an article. The user clicks the publish button triggers the function “openConfirmDialog()”. Show the confirm dialog. Wait for the user to c…
Tag: javascript
Asana NodeJS API – Cannot authenticate request error when using client.useOauth
I’m currently setting up and integration with Asana and want to have my users connected through the oAuth side of the library. I have successfully got the auth flow working in the sense of having the user navigated to Asana, authorize the app, then storing the access token and refresh token for use down the l…
Replace a specific character from a string with HTML tags
Having a text input, if there is a specific character it must convert it to a tag. For example, the special character is *, the text between 2 special characters must appear in italic. For example: must be converted to: So I’ve tried like: it is replacing the star character with <i> but doesn̵…
Concatenative inheritance vs class inheritance in JavaScript
concatenative inheritance works like a composition to me when I look to it at the beginning, but people keep naming it as an inheritance. classes, however, use the prototype to create a prototype chain that connects objects together. the question now is, if both concatenative inheritance and class inheritance…
Is there a way to add tooltip to text in a Discord bot message?
It’s the first time I’m writing a Discord bot, decided to go with the Discord.js module. One of my goals involved adding tooltips to certain words in a sentence so that the user can mouseover the word and get additional information. The only idea I had after searching for an hour was using an embe…
I cannot select the (“text”) in my svg when I want to change the values
I have a problem where I can append the text into SVG but when I want it to change I can’t seem to select it to change. The code above the d3.select(“button”) all works as well as the bar.transition. Can someone help me figure out how to select the “text” so when I click the butt…
Vue.js: Passing Object with Symbol type value with v-bind
I’m trying to pass an object using v-bind to my component: My object is using Symbols for some of the values: Vue throws an error when trying to render this component: If I replace the value for myObject.type with a string, there is no longer an error. I’m also able to pass the object fields separ…
Taking a stab at a Javascript Timer and failing
The simple application crashes when I click the startBtn by indicating that displaySecs is null. I watched several tutorial and tried to create my own custom timer. Are there too many if statements? Is there a simpler cleaner way to do this? Answer this way: following the PO’s comments for a request for…
Can i use different images for each custom dots for my slick slider?
i have a question for slick slider veterans: I want to put custom images for my dots on a slick slider, but i want to use different images for my slider dots. So for example i have 5 slides, and i want my 5 dots to have seperate images, so 5 different images (10 if i use different ones for
How random option catch correspondent number?
How random option catch correspondent number ? For example: If question random option is (4) (2) (3) (1) arrangement Answer should be (1),because set class=”correct” in question1 option1 but in the case (1) is X (wrong answer). I guess it get <div> position, so array and real number not matc…