Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
18 views

How to add a class and remove when clicked, or when clicked elsewhere? [duplicate]

I have a caret dropdown that is supposed to do an up and down animation on 4 different tabs. In general scheme of things, these tabs populate different content when clicked on. The problem here is ...
Schneider G's user avatar
1 vote
1 answer
34 views

How to change content in an onclick function for all elements inside a button tag?

I have a layout where if the image and/or text are clicked, then it populates different information below it. If I have an img and paragraph inside the button, it will only work if you click anywhere ...
Schneider G's user avatar
0 votes
1 answer
58 views

Simple JavaScript on click event is not working [closed]

There is a CSS file and js file that was copied for a custom particle engine background. I can post them if this file isn't the problem but they are extremely complex. There is another CSS file to ...
Aiden Figueroa's user avatar
1 vote
0 answers
10 views

How to add onClick event to PopupMenuBarItem in Dojo?

I can't figure out how to add an onclick event to a menu item, please help me solve this problem. <script> require([ "dijit/MenuBar", "dijit/PopupMenuBarItem&...
Alexander Ermolenko's user avatar
0 votes
2 answers
48 views

Button onclick shows hidden message javascript

The button needs to be edited in css to appear the way I have, that part worked. Then it needs to show a message that says "welcome to the world of coding!" upon clicking the button. I feel ...
Molly Hartley's user avatar
-3 votes
0 answers
22 views

Confirmation popup while using submit button in DIV onClick action [closed]

I try to add a confirmation button for this kind of action : <div id="left"> <p>RTC actions</p> <div onClick="emit('reboot')" title="Click to reboot ...
wanwan's user avatar
  • 89
1 vote
1 answer
27 views

Vite + Typescript can't call onClick function, not defined

I am working on weather app in Vite + Typescript, no framework, just plain TS. I want to have delete function for each weather list item. When I click on delete button clickedID gets passed down to ...
Darius Molotokas's user avatar
2 votes
1 answer
42 views

Javascript onclick event based on corresponding id iterations

I am attempting to create dynamic modal popups from query feeds in WordPress. One feed displays elements that need to be clicked and one feed holds the content for the modal popups. My current code ...
Jake Olsen's user avatar
0 votes
1 answer
58 views

Clicking a button to populate a div with value, and then use this value for an onclick function - Javascript

I have a text box here which when I click into it and press a letter, it populates with that letter. Then I click a button (Go) which takes the letter I have entered and runs a JavaScript function ...
BarryG's user avatar
  • 1
1 vote
1 answer
35 views

jQuery onclick show value of dynamic checkboxes

I have this group of checkboxes displayed using a while loop form sql select. The checkboxes have values assigned to them from sql. I have assigned all the checkboxes the same class. If I click on one ...
lotsu julius's user avatar
0 votes
0 answers
33 views

how to add a link to dropdown buttons

Currently I am working on a django project and I am trying to add a dropdown menu on home page to change password and Log out.I tried to add links to dropdown menu buttons but it didnt work . I used ...
newdawnnewday's user avatar
-1 votes
0 answers
28 views

Click Event Not Triggering Function, but Mousemove Works

This is the function function handleCurator(country) { // Show the popup const popup = document.getElementById('curatorPopup'); popup.classList.remove('curator-hidden'); // Function ...
Ardhaoui Amine's user avatar
1 vote
3 answers
75 views

Ajax send response successfully but PHP dont receive data

I have a shopping cart page and button like `<button class="purchase-button" data-courses-id="<?php echo $coursesID; ?>" onclick="Payment()"> </button>` ...
qanh's user avatar
  • 11
0 votes
2 answers
38 views

onClick does not work on first click in React

I have a button that shows/hides an element when click but it does not work on first click but it works on the following clicks. I'm expecting it to work on the first click. import { useState } from &...
mon's user avatar
  • 13
1 vote
2 answers
94 views

Audio play button firing phantom second click when currentTime is modified programmatically, preventing playback

When I pause an Audio and set it's currentTime, it does something weird. when I press a button that controls the .paused state of the Audio, it seems to click again automatically, preventing the audio ...
eac's user avatar
  • 49
0 votes
3 answers
36 views

React OnClick event not passing parameter, rather passing SyntheticBaseEvent

I am creating a modal. This modal will be opened when any of 6 div elements are clicked. Each of the components are created using the .map() function to an array. The popup parameter is supposed to be ...
IPSDSILVA's user avatar
  • 1,819
0 votes
0 answers
12 views

Some functions are not executing when calling the onClick of my Button widget

I use the Room Library to save data I want that before saving the data proceed to the assignment of values to 2 fields of my table. Thus only the last assignment is executed when I consult my database....
Loïs Nouke's user avatar
0 votes
0 answers
26 views

c# I want to assign the S key to the button, but I can't

using UnityEngine; using UnityEngine.UI; public class ButtonScript : MonoBehaviour { private Button button; void Start() { button = GetComponent<Button>(); button....
Ahmet baray Gündeşli's user avatar
0 votes
1 answer
48 views

Rendering UI Component at onclick

I am just working on a project, I just wanted to ask that can we do ui component rendering at onclick. Example: <div name="log-in" onclick={<Login/>}> </div&...
Tayyeb butt's user avatar
-3 votes
1 answer
67 views

How to trigger bootstrap toast ? other then button type="button", or fetch() [closed]

Is there a simple, other solution to trigger my boostrap toast which doesn't involve a button? Maybe like : button onclick ="trigger my bootstrap toast the easy way" without the need of ...
al-naba project's user avatar
0 votes
1 answer
31 views

Add Text to span complex field by Jquery

I want onclick event on <input> tag to display custom error in <span> placed tag just below it I have many input readonly fields like, <input class="form-control valid" id=&...
Samie Ullah's user avatar
1 vote
1 answer
87 views

Change CSS of the clicked element

Probably a silly question, but the basic way I learned how to change CSS of something on click is var x = document.getElementById("id"); x.style.height = "auto"; or whatever....
Einar Zotterman's user avatar
0 votes
1 answer
39 views

MRTK2 Interactable I Which Receiver should I use?

So I am trying to create my own button in unity with MRTK2 for the Hololens2 but my problem is, that I do not know which receiver I should use in the interactable component. Usually I use ...
DumbQuestionsAnyway's user avatar
0 votes
0 answers
25 views

Incorrect click coordinates for events caused by react onClick handler

I'm seeing weird behavior with react onClick handlers when device emulation mode is turned on in Chrome (and also in my own capacitorjs apps running on an Android device). Essentially, clicks right ...
Andrew's user avatar
  • 1,988
0 votes
0 answers
7 views

An event listener using named function with arguments of element id's and then remove event listener upon completion of task [duplicate]

I was making a tic tac toe using JS . It came out fine but even after a player wins it still let us mark down the empty boxes. So i tried to enclose the main program into a named function and passed ...
Aman Kaushik's user avatar
0 votes
2 answers
76 views

How to use class name to change an element's display?

Let me be frank, I have no idea how javascript works. I was hoping someone could show me how to get this to actually function. What I'm trying to do is use the element's class name to change it's ...
David F's user avatar
0 votes
1 answer
29 views

How can I display single quotes instead of the HTML entity when adding onClick events to WordPress menu using nav_menu_link_attributes?

I like to add a class and an onClick event to a single WordPress menu link. My code is based on an example given by WordPress here: function add_specific_menu_atts( $atts, $item, $args ) { $...
Croco2511's user avatar
0 votes
0 answers
35 views

Adding style property to individual class elements on click, IF their data is modified

I'm trying to make a browser dress up game with separate tabs for draggable items (so tops, bottoms, etc). This is the JavaScript code for how the tabs function. function openTab(event, Category) { ...
frozen dwarf's user avatar
1 vote
1 answer
62 views

TypeError: props.signIn is not a function

I'm developing a React application where I've implemented a login form using styled-components and Redux for state management. The login form includes a Google sign-in button (Google styled component) ...
jaspreet's user avatar
-1 votes
1 answer
43 views

im trying to run some very basic javascript on a click event and im getting an undefined function error

<script> function x() { console.log("thisWorks") } </script> <button onclick="x()"></button> my hopes were that clicking the button would trigger the console ...
bestbuilder04 bob's user avatar
3 votes
2 answers
801 views

What's the recommended way to click away from a dialog with Playwright?

I'm writing a web app that uses Mantine's <Modal> dialog component. The modal shows an overlay on the background when opened. Clicking on the overlay causes it to close. I am trying to write a ...
Peter's user avatar
  • 47
1 vote
3 answers
69 views

Make buttons to switch between 12 and 24 hour time that saves to localstorage

I have a clock in my website, and I would like to add a button or switch into settings that switches the time from 12 hour and 24 hour and vice versa. My problem is that I have no idea where to ...
soyuzlord's user avatar
0 votes
0 answers
43 views

How to link to marker on Leaflet map from another URL

This works perfectly for activating a popup on a leaflet map on the same page: {<a class="mplk" href="#where" onclick="t5.fire('click')">See on map</a>}. The ...
Maxime Bonnet's user avatar
-1 votes
1 answer
41 views

find div in repeater when onclick

My friends, I want to change the class of a tag div in on click button (asp.net), but that div is inside the repeater, how can I find it? and change class? Actually, I want to change bootstrap column ...
user25547267's user avatar
0 votes
1 answer
43 views

How to change state on individual parts of a mapped arrray in React

I've got a mapped array thats set up to look like playing cards. When I click on them I need them to 'flip'. Right now my onclick 'works' and the state/property goes from 'faceup' to 'facedown' but it ...
Adam's user avatar
  • 37
0 votes
1 answer
49 views

Dropdown menu is losing all styling when .active class is enabled but with on:hover it works

I encountered a strange behavior in a dropdown component and I can not figure out what causes the problem. Any help is really appreciated! It is a simple dropdown. I used React, CSS and JavaScript ...
Mawin's user avatar
  • 1
-1 votes
3 answers
44 views

Why does my querySelector not select the correct ID for a step in an HTML form?

My digiNextStepMobil does not get called properly and the form does not go the step2, when I press the button. HTML <form id="digi-productGuideForm-mobil"> <div id="digi-...
Nikolaj's user avatar
0 votes
1 answer
75 views

How to save an image to localStorage with onclick event? (javascript)

Without using back-end, I am trying to do a shopping cart feature so when I click an image on one page it saves the image to localStorage so it can be displayed on another page (a checkout page). I ...
bkw's user avatar
  • 111
0 votes
0 answers
19 views

Jquery : How to prevent click event as long as css transform translate is in progress?

I create my own datepicker . Each time I click on year, month, day, hour and min window my div moves/slides from left to right by 300px. Same action is produced when I click on the arrow left to go ...
Rak Arthus's user avatar
0 votes
0 answers
43 views

How to access the input box by clicking an object?

This is how my layout is: I want the user to be able to click any of the circles, which will allow them to be able to put in a player name and player number, which will then be displayed on the ...
Zaid Khan's user avatar
0 votes
0 answers
41 views

How to add / delete markers on click using react-photo-sphere-viewer and the Marker-plugin

Can anyone give me some example code on how to get this to work. I am using Nextjs. The markers are not showing on click.I want user to interact with their 360 images and being able to add markers ...
Raoul Spronck's user avatar
1 vote
2 answers
141 views

QML TapHandler: how to ensure only top-most handler gets the events

As I understand it, if you have more than one QML TapHandler covering the same location, they all get the tap event by default; but you can change this behaviour using the grabPermissions property. In ...
Paul Masri-Stone's user avatar
-2 votes
2 answers
37 views

my javascript stopwatch project isn't working properly

I coded a stopwatch watching tutorials with JS. I commented out a few lines of code that my tutor had written, something that I do not understand. So after I commented those lines out, whenever I ...
noob star's user avatar
1 vote
1 answer
55 views

Cannot stop a listener in javascript

I'm working with Pikaday (https://github.com/Pikaday/Pikaday). I'm trying to create a calendar with two months opened at the same time, which would allow to choose a date range. Everything works ...
themilkyone's user avatar
1 vote
1 answer
93 views

Button-Markupstring in Blazor (c#) from CodeBehind does not trigger onclick-event

I'm using a Blazor WebApp with C# and .net 6. In this example I'm using the standard project "Blazor Server App" (VS 2022) for testing. I built a own "table helper", where I can ...
Markus H.'s user avatar
0 votes
1 answer
27 views

Capture click event for Datalist Option in React

Assume to have this Datalist element in a React component: const MyComp = () => { return (<> <input list="list-name"> <datalist id="list-name"> ...
strongmmc's user avatar
  • 165
0 votes
1 answer
48 views

Click event doesn't happen until I click the button 2-3 times

I am writing a calculator for ADHD medication dosages. However, when I press "Convert!" I have to click it several times for the placeholder text to appear. What's going on? Nothing I try ...
Tilly's Spam Emails's user avatar
1 vote
3 answers
104 views

Not possible to set focus on content of Tooltip component from Material UI on firing onClick event but possible on firing onKeyPress event

I am using Tooltip component from MUI in my customized TooltipComponent. TooltipComponent works similar to Dialog: user can see some content pop up after clicking (not hovering) on element (div with a ...
yakob's user avatar
  • 61
0 votes
0 answers
37 views

How to prevent React 16 from propagating a Click to child component

Situation: I have a chat and a messagelist inside it, same as a WhatsApp chat screen. When clicking an image (<ModalImageCors\>), it opens an image modal. Ok. But if selectingMsgs state is true, ...
Gian's user avatar
  • 146
-1 votes
1 answer
34 views

onClick not working in a component - Reactjs

I'm making a small React project and in a dropdown, I'm using onClick and calling a function in it. Here, I'm mapping the data which I get by typing the keywords. For each data, I'm calling a ...
Shakti Raj Singh's user avatar

1
2 3 4 5
294