14,654 questions
-3
votes
0
answers
42
views
Onclick setting a value when page loads instead of after the link is clicked
I have this link in my jsp page:
<p>Make a payment to keep your account active. <a href="/payment/payment.form" id="lnkPayment" onClick="${ payment.selectedForPayment ...
3
votes
2
answers
55
views
Why does this collapsible need 2 clicks to open, then 2 more clicks to close?
Description
I'm having an issue with a collapsible requiring 2 clicks of a button to open, then another 2 clicks to close. The Show/Hide text inside the button gets mixed up as well. I think it might ...
-2
votes
1
answer
119
views
Delay issues with onClick using data from useEffect
I'm making a small flight tracker system and I'm encountering an issue. Here's the code for a "choose your flight" page:
"use client"
interface MyPageProps {
searchParams: ...
-1
votes
1
answer
140
views
Extracting elements of an OnClick function to modify it at runtime [closed]
Is this the best way to modify certain links in my webpage to add search parameters? Are there better ways?
I do not want to do it by Sessions variables, because I am going to another subdomain of my ...
0
votes
0
answers
67
views
Code fullscreen element responsive by clicking fullscreen button? Simulate a mouse click?
I'm trying to get fullscreen for iframe element immediately responsive to user input (e.g., keyboard input) without having to manually click when fullscreen to get the fullscreen responsive (think of ...
1
vote
3
answers
67
views
Function in external file doesn't run when button is pressed despite being bound in onclick in HTML/JS
When I run this, it doesn't run the function when I click the button, however it is run once when the website is loaded/reloaded even though (as far as I can tell) the code doesn't do that at any ...
2
votes
1
answer
59
views
How to limit matplotlib button_press_event to a single axis?
This script:
import matplotlib.pyplot as plt
from matplotlib.widgets import Button
def fAccept(_):
print(f'accepted')
def onclick(event):
print(f'click {event.xdata, event.ydata}')
fig, ax = ...
0
votes
0
answers
32
views
How to make a transparent scrollable layer pass click events to the layer below in Jetpack Compose?
I'm working on a Jetpack Compose layout where I have three layers:
A blue Box at the bottom that is clickable.
A transparent full-screen Box on top of it that should allow vertical scrolling (using ...
1
vote
1
answer
67
views
How to display 3 elements by 3 of an array in HTML using array.sclice() method in javascript
I have found a way to display a portion of an array using arrayName.slice(start, end), i made a funtion to feed the start and end to the slice method so i can use it with onClick button to click next ...
0
votes
0
answers
43
views
button Element doesn't work on Iphones for some reason
I have tried to make something for Math class, however the button elements didn't seem to do anything on Iphones. I have tried to use eventlisteners and the onclick Attribute.
Does anyone know why it ...
1
vote
1
answer
285
views
Why is my LazyColumn item's clickable modifier not working in Jetpack Compose?
I'm working on a Jetpack Compose app where I have a LazyColumn displaying a list of items. Each item is wrapped in a Surface with a clickable modifier, but clicking the items doesn't seem to work. I'...
0
votes
4
answers
80
views
Combining 2 addEventListeners which do the same thing into 1
I would like clicking div-1 and div-2 to do the same thing but please how can I combine the 2 eventlisteners functions into 1
var div_1 = document.getElementById("div-1");
var div_2 = ...
2
votes
3
answers
79
views
Run custom function before open in new tab
I am using an <a> tag instead of a button because I need to add the feature that allow user to right click and then open in new tab:
The issue right now is that this tag have an onClick ...
0
votes
1
answer
69
views
Responsive navbar click
I try to get my navbar responsive. Follow this tut on w3schools. If I copy and paste it is working, but I want it to be mobile first (media queries) and there is my problem.
The switch from mobile to ...
0
votes
0
answers
38
views
Message set with "setError()" on a clickable TextView is not shown
I am not able to find the correct configuration for the behaviour I want. I have a layout with 2 TextView for displaying a date (birth and death date). To set both dates, the user touches (onClick() ...
0
votes
0
answers
36
views
Crash with no specific location (Android studio)
My app shows error in Google play analytics that I can't replicate mainly because it does not show me it's location.
I can only assume that it is related to some onClick method from one of many XML ...
0
votes
1
answer
102
views
Can Button "without an onclick event" be nested inside Link component in NEXT JS
Is it acceptable to integrate a <button> element inside a Next.js <Link> component? I tried this approach, and it didn’t result in a hydration error. Is this a recommended practice, or ...
1
vote
1
answer
802
views
Trigger an onclick inside a PrimeVue Dropdown
I am trying to test using a console.log on a Dropdown inside a PrimeVue. Looking this up I was suggested I would use "item-template" but this seems like it is not used in the since it's not ...
0
votes
0
answers
32
views
react-draggable issue on mobile devices
I have an issue with react-draggable library, when on mobile or tablet devices onClick from children are not propagated. Anyone knows which might be the reason?
<Draggable onStart={handleDragStart} ...
1
vote
0
answers
39
views
When loading from a file, the .observe and .on_click functions don't work on a rerun of the cell
I'm using IPyWidgets in a Jupyter Notebook in VS Code. When making an interface, I use a .py file to code and load this into the notebook. This looks like the following:
import Moduals.TestFile as ...
1
vote
1
answer
56
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 ...
0
votes
2
answers
108
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 ...
2
votes
1
answer
85
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 ...
1
vote
1
answer
37
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 ...
1
vote
3
answers
93
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>`
...