All Questions
672 questions
0
votes
0
answers
43
views
Login Button in Qt Designer [closed]
I created a login interface in Qt Designer and when I converted it to Python code and ran it, everything looked just fine up until I clicked the log-in button and that was when the program just ended ...
0
votes
1
answer
35
views
How do I call a Function in window2 from the page I opened it from window2?
I and trying to open a window with the window.open code,
var myWindow = window.open(url , name, details);
and then I want to execute a function in that window after it loads.
var myWindow = window....
0
votes
0
answers
27
views
php Create a button to call a function inside a fetch_accoc
I have a web page which is using php code to search and retrieve images matching tags the user enters. It is using mysql to store the image paths and retrieve the images for the user along with image ...
0
votes
2
answers
34
views
JavaScript functions don't seem to be executed when button is pressed
I am working on an app in Android Studio. I made a few buttons in my HTML and had put the 'onclick=""' value as my functions for each button as needed.
When the page loads, the JavaScript ...
0
votes
1
answer
60
views
Elevated Button OnPressed function not working
please when create an elevated button and then give it an empty funtion it indicates an error which doesn't allow my code to run. Even if i give it a simple function it still doesnt work. can someone ...
0
votes
1
answer
44
views
Javascript not seeming to be noticed by html file when button calls function, and not sure why
I'm new to JavaScript and html. I've been trying to figure out how this problem is coming up but it's not really consistent. Is there something I'm doing wrong that I'm not noticing?
--JavaScript--
...
0
votes
0
answers
48
views
powershell screen with dynamically built buttons call a function based on the button clicked [duplicate]
I'm 4 years retired, converting a routine I wrote umpteen years ago in VBScript.
This portion of the script, reads the contents of a folder,
Then builds a screen, with buttons for each TXT file found ...
0
votes
0
answers
27
views
tkinter button image inside a function not working - python
I've been trying to get this to work with no luck so far. I simplified the code to only the relevant pieces. I can display an image button in the main class, but inside a function I cannot get the ...
0
votes
0
answers
6
views
I want to use a function to capture the value of each code on each button on my simple calculator project
I did a calculator project that has numerous buttons using the onclick event to assign codes to each button, I want to use a function to avoid repeating codes on each button, help please
I tried using ...
0
votes
1
answer
16
views
One Java function fails to activate after another begins
I am very new to coding. I am trying to create a series of maps of Hawai'i, where the political borders change as you select buttons with dates. I am doing this by using javascript to change the image ...
0
votes
0
answers
46
views
Python tkinter How to make a button that calls a function in a class
I'm doing a simple calculator in python and I'm wondering if it is possible to make a button that calls a function in a class.
from tkinter import*
l1 = []
l2 = []
root = Tk()
class przycisk:
...
0
votes
1
answer
29
views
Add an event listener to the first button that changes the text within the <h1> to EITHER uppercase or all lowercase
Hello code friends I have an assignment, new to this
Add an event listener to the first button that changes the text within the to EITHER all uppercase or all lowercase, depending on current state.
I ...
0
votes
1
answer
925
views
Trying to create a callback function from one widget to another in Flutter. It won't work
I'm trying to create the simple "press button to increase number" program in Flutter. I separated the text widget that shows the number and the button that increases the number into their ...
0
votes
0
answers
36
views
How to execute function connecting to external device by clicking the button in tkinter? [duplicate]
I am using Pycharm to control lock-in. To connect to the device I have defined a function. I want to run the connection by clicking the button. However, when putting the device parameters at the ...
0
votes
1
answer
46
views
How to write a function that will handle multiple onclick events which toggle the visibility of a field
Ive not been coding long and I am new to javascript. Im making a simple web page that will show and hide part of a sentence for the purposes of learning foreign language. Is there a way to write one ...
0
votes
1
answer
59
views
My buttons requires double click for increase or decrease index
I have a problem. I want to update my component with button interaction. But I have to double click on these buttons. How can I solve this? I am adding my browser console result. First click is not ...
0
votes
2
answers
81
views
JS script running via HTML button
So I'm new to the programing world and I've been busting my head around this situation that I can't seem to figure out..
I have an HTML button and a function (if - else) and I want the function to &...
0
votes
2
answers
124
views
Button is not moving when clicked
I created a button that must move to a random position when it is clicked.
I created a html page with a button that has a
function.
The function is called and I created two variables height and width ...
1
vote
1
answer
129
views
React / Material UI onClick doesn't work when given two functions
i have this Material UI Button inside a React Component
interface ConfirmBorrowPopupProps{
amount : number;
function: Function;
}
export function ConfirmBorrowPopup(borrowPopupProps: ...
1
vote
2
answers
56
views
Update database when an checkbox or button clicks
I have a seperate column in my gridview and also I have added an checkbox/button. So when an user checks or clicks the checkbox or button it should update my oracle database. When an user checks the ...
0
votes
1
answer
45
views
Functions Running Incorrectly
I have a function buttonSwitch() that is running at the incorrect times. I have a counter count and cost , the cost of buying an "upgrade". It functions normally at the beginning, the ...
0
votes
0
answers
18
views
Why does my button not work, when I change it's innerHTML back w/ js innerHTML? [duplicate]
I'm working on a project w/ a series of buttons that do different functions. And my current dilemma that does not make sense to me is why a button stops working when I click the default button.
The ...
-2
votes
3
answers
71
views
Why does my PHP function only decrement my button on the first click?
When I click on my button it removes 1 from $decr but if I click again it does not remove anything:
<?php
function myFunction() {
global $decr;
$decr--;
}
if (isset($_GET['name']) ...
-2
votes
2
answers
35
views
How do I get my button tag to call a function
Here, everything is working just fine. I only need my button tag to call the function which displays a random number on the p tag in DOM and not me refreshing the page all the time.[Here is my HTML]...
0
votes
2
answers
232
views
How do i store the text of a button in a global variable?
I am trying to store the text of a button in a variable or function that i can use later. So it should be in the global scope i suppose. But i can't figure out how to do that because if I console.log ...
0
votes
1
answer
1k
views
A button which would stop the program when pressed in python with tkinter
Is it possible in python with the use of tkinter to have a button which would, when pressed, stop the program completely, not only closing the window but would stop it ?
I tried 2 different ways of ...
1
vote
1
answer
64
views
Why does when calling the reset() function, other functions that are onclick on the button stop working?
Trying to build my first "quizAPP". The reset function doesn't let me click other buttons when clicked.
Here is my code: https://codepen.io/Leonyr/pen/eYLEEgq
function reset() {
num = 1;
...
0
votes
1
answer
25
views
Buttons generated via JavaScript do not call functions in VueJS
I've made a function that generates buttons for every item in a list, and every button when clicked should run a function in the App.vue file.
The problem is that the onclick and the v-on:click ...
1
vote
3
answers
286
views
Tkinter Switching between multiple frames with 2 buttons
I am new to Python and tk and trying to learn by creating a application. In this I want to have one window with 5 frames stacked on top of each other and two buttons called "Next" and "...
1
vote
3
answers
1k
views
How to change the value and the function of a button on flutter?
I have a function named saveData which is executed on pressing a button. I want if I click on the button I execute saveData function and the value of the button become stop then when I click on stop ...
0
votes
0
answers
35
views
Why can't I dismiss kivy popup with function
Why can't I dismiss kivy popup in function. But if try do directly it's working
press() function is working, and print data, but not closing a popup.
def random_range():
"""...
0
votes
1
answer
407
views
How do I make a forward and backward button in Python Tkinter?
I'm trying to make a simple image viewer with Tkinter in Python. I'm having issues with the functions of the forward and backward buttons, the pictures are not changing even though the value for the ...
0
votes
0
answers
187
views
how to add function on button click in laravel
i was have my team who was working on my project and certainly some of the reason they quit from this project now am just facing an issue that is whatsapp function is not calling on button click even ...
0
votes
3
answers
190
views
Onclick function using switch cases
I want to make a search bar and in such a way that if i write different organisations name (Deloitte, TCS, Wipro, etc) and then click on search button, then the official site of that organisation will ...
1
vote
2
answers
71
views
JavaScript function with parameter runs once and can't be called again
A JavaScript function I made isn't finishing/starting at the second time properly, and as a result, I can only see the effects once.
<button class="taken" id="A05" ...
0
votes
1
answer
377
views
Pug JS Express running a function from pug
A pug file with button(onclick) run the function in js file, if both of the files are inside the public and views folder or both of the files are out of the views and public folders.
How can I run the ...
0
votes
1
answer
55
views
How to Toggle (Hide/Show) an Element in JavaScript
I have an invoice webapp and trying to add a button to Toggle (Hide/Show) invoice stamp before printing/saving pdf
but I can't make it work.
Stamp part : source from ".json" template file
&...
0
votes
0
answers
171
views
Local Storage not working with window.location.replace?
I tried using Local Storage to store a variable to determine if a button can be used or not. This however is not working at all like I expected. Why is the Item getting shown as "null" and ...
-1
votes
1
answer
39
views
Why are my buttons not invoking functions in html?
beginner here, I'm trying to make a display with buttons that could display additional information. I went about attempting this by having the information be set to display: none; and then setting ...
0
votes
6
answers
383
views
How to create a button that runs a javascript function multiple times?
Basically I want to be able to rotate the numbers clockwise when I click the rotate button. I think I've attached all of the associated code. I created a button. It links back to the javascript ...
0
votes
1
answer
29
views
Can't save data using push button (MATLAB)
I'm trying to create a figure where the user can select cells to turn on or off. Then, the user can click a button 'Enter' to save the board as an array. I successfully found a way to create ...
0
votes
1
answer
915
views
Add span text to input text value on click
I am looking for a way to add text from my span tag into the input value field when you click on a checkbox.
I do not want to use jQuery for this, only JavaScript.
I have done it so it adds the text ...
0
votes
2
answers
51
views
Reactjs If Else for maximum number
Im trying to figure out how to use conditinal rendering in react - if else statements but Im struggling, I need the button, that has only increment, to stop adding number past certain number, lets say ...
-1
votes
1
answer
37
views
textContent not changing when activating function
i made a function that activates onclick to change my html textContent
here is my javascript code
let num1 = 8
let num2 = 2
document.getElementById("num1-el").textContent = num1
document....
1
vote
1
answer
57
views
Assign URLs to multiple buttons without onClick
I am building a quiz with Webflow handling most of the front end load but want to add in a script so I can easily change all the URLs in one place without opening all the different pages, as there ...
0
votes
1
answer
48
views
how to add a function to a button thats within a button on Tkinter
Im trying to add a command on newButton where when clicked, it shows a new blank page where i can then enter several input boxes and labels (almost like a survey)
I'm just not sure how to add a ...
1
vote
1
answer
668
views
how to add a button within a button on tkinter?
i have a button in grid, and it already has one command, which just prints text. However i want a button to pop up as well as the text. so long story short, i'm just trying to add a button within a ...
2
votes
2
answers
1k
views
How would I dynamically update buttons in PYSimpleGUI
I am trying to create a looping text based "choose your own adventure" story game. The code is built into separate functions. Each function has a story element (returned in text format), a ...
-1
votes
1
answer
62
views
Comparison of variables in a function
I have several buttons with different identifiers that are made in the form of int and passed to the button
int keyButton1 = 1;
int keyButton2 = 2;
int keyButton3 = 3;
int keyButton4 = 1;
...
0
votes
1
answer
131
views
How to compare the key of two buttons
I have two columns on the screen with 2 buttons each. Each button in the column has its own meaning. In another column there are buttons with the same values. I would like to find out when I click on ...