News Articles onclick

Web3 Token Holder Requirement to Show Image

Is it possible, in Web3, to call a function which would require the user to first hold an ERC20 token before an image/text is visible? This would be similar to a password requirement, but instead of typing a password for the function to take effect, they would simply have to hold at least 1 ERC20 […]

How to use HTML checkboxes to modifiy a database in Code Igniter?

I am using trying to use code igniter to create an interface where users can check tickboxes next to images, changing a value in our database. The challenge is that when users check the tickboxes, values are not changed in the database. If I manually change values in the database, the tickbox values are changed […]

My onClose prop functionality is not working

I am trying to change and wrap another component "Modal" to my conversations panel. My last components name was SlidingPanel which had a different functionality. I am trying to pass my onClickOutside, and or onCloseClick prop to the modal so that when clicking the close button or outside the modal, the modal closes. Somehow I […]

My onClose or onOpen prop functionality is not working

I am trying to change and wrap another component "Modal" to my conversations panel. My last components name was SlidingPanel which had a different functionality. I am trying to pass my onClickOutside, open and or onCloseClick prop to the modal so that when clicking the close button or outside the modal, the modal closes and […]

nuxtjs add and remove class on click on elements

I am new in vue and nuxt and here is my code I need to update <template> <div class="dashContent"> <div class="dashContent_item dashContent_item–active"> <p class="dashContent_text">123</p> </div> <div class="dashContent_item"> <p class="dashContent_text">456</p> </div> <div class="dashContent_item"> <p class="dashContent_text">789</p> </div> </div> </template> <style lang="scss"> .dashContent { &_item { display: flex; align-items: center; } &_text { color: #8e8f93; font-size: 14px; } […]

How to add onclick property to multiple buttons using DOM manipulation [duplicate]

I am trying to add onclick properties to multiple buttons using DOM. langButton.onclick = searchEngine(langButton); does not add the property to the button and eventListener does not work either. I need to read the text of the specific button that is clicked, or just copy the button all together. Here is the code block: for […]

The button has no operation. How to use the switch as a function

I tried this method but it did not work. Please advise how I can use the switch as a function in events.I tried this method but it did not work. Please advise how I can use the switch as a function in eventsI tried this method but it did not work. Please advise how I […]

Multiple function in onClick event

I have a button with an onclick event. This button closes a dialog and changes its value. I have two functions, one that changes the buttons value handleChange and the other that closes the dialog and displays an alert to confirm onSubmit. Problem: I tried calling the two functions separetly on the onClick event. While […]

Using React, my three.js camera is undefined after a click event

I am creating an interactive map using Three.js and React. My problem is: I have 2 buttons on top of my canvas to be able to zoom in on my map. When I click on one, I get this error: TypeError: Cannot read property ‘position’ of undefined (line 165) I understand that my camera is […]

Problem add click event on div elements, and play respective audio elements

how do add a click events listener to all the div elements, such that when clicked they play the respective audio associated with the same data-key? <div id="click" data-key="65" class="key"> <kbd>A</kbd> <span class="sound"> HeyHey </span> </div> <div id="click" data-key="83" class="key"> <kbd>S</kbd> <span class="sound">Dungeon Master</span> </div> <div id="click" data-key="68" class="key"> <kbd>D</kbd> <span class="sound"> Yamite </span> </div> […]

Delete item at selected index when clicking delete button – React

I’m currently having an issue where when I click on the delete button for a particular element it only deletes the first item in list array every time rather than the selected one. Any help with this would be greatly appreciated! 🙂 import "./css/App.css"; import React, { useRef } from "react"; function App() { const […]

How to deleted elements of a list who are meeting a certain condition on React js

I would like to delete all completed items of a to do list when pressing a button. How could I do that ? my useState is like this : const [todos, setTodos] = useState([ { id: 58477, text: "Wash dishes", done: false }, { id: 64851, text: "Bake a cake", done: true }, { id: […]

How to navigate to next screen with data in react native

I am very newly in react native app developement. I have problem is am try to navigate to first screen to second screen with data(String and image) also. but will try to navigate error. The error was navigate is not defined. Please solve my issues and edit my code . I have attached my code […]

how do you deselect a word when clicking on it again?

I’m playing around with a blackout poetry tool which works by allowing users to type/paste a block of code into a text area. Once they click submit, the words become clickable units. If the user clicks on a word, it will ‘blackout’ (the background will turn black). What I want to do is add (I’m […]

How do I change the button color on click?

I am using Javascript and ReactJs to try to change the color of the "exclude" button when I click on it from white to red. If I click it again it I want it to change back to white. I am doing this in the button tag and trying to use useState. I included the […]

Vue – How to read array element’s name on click

I’ve been working with a network node component on a Vuejs project and I want to click the nodes and display the names of each one. Here is the usage of this component; <d3-network :net-nodes="nodes" :net-links="links" :options="options" @node-click="testFunc()/> And here are the nodes and links arrays. nodes: [ { id: 1, name: "Node 1", _color: […]

d3-network click event – how to receive clicked node definition?

I’ve been working with a d3-network Vue component and I want to display the name of node when it is clicked. Here is the usage of this component: <d3-network :net-nodes="nodes" :net-links="links" :options="options" @node-click="testFunc()" /> And here are the nodes and links arrays. nodes: [ { id: 1, name: "Node 1", _color: "#aa00bb" }, { id: […]

Click event not working in TypeScript (.tsx file)

I am trying to add a Copy to Clipboard functionality and the file that I am working on is .tsx. Below is the code snippet that I have but it seems that the click event is not working. I added the console.log(‘CLICKED!’) to test. but it is not showing on the console when I click […]

Sitemap | Terms | Privacy | Cookies | Advertising

Senior Software Developer

Creator of @LzoMedia I am a backend software developer based in London who likes beautiful code and has an adherence to standards & love's open-source.