Most voted "onclick" questions
Use this tag when the question refers to some resource, information or problem related to the "click" event, which occurs when the user clicks on an HTML element.
Learn more…98 questions
Sort by count of
-
0
votes2
answers2017
viewsHow do I turn on onclick in my javascript?
Well, I’m making a game in javascript where I have 100 buttons and I need the value of the button that the user click to be searched to validate whether the user got it right or not, I recommended…
-
0
votes1
answer327
viewsChange the properties of an SVG object with JS
I’m learning about graphic creation SVG for HTML and would like to know how I can change the properties of an object SVG (line, cicle, rect) through JS for example, by clicking on a button it change…
-
0
votes1
answer642
viewsHow to call a method that is inside my Fragment through the onclick of a button that is also inside the Fragment?
How to call a method that is within my java Fragment through the onclick of a button contained in the same Fragment? Follow code: public class Fragmentminhaconta extends Fragment { @Override public…
-
0
votes1
answer207
viewsWhen I click the button more than 1 time the count accelerates
People I got from a friend here on the forum a one button script with countdown, that when clicking starts the count. I really appreciate it because it is very good... there is only one problem,…
-
0
votes1
answer98
viewsAccessing a specific component within a listview
I have a music list with a favorite icon, when the user clicks on this icon I want to change the color of the icon as the like action. In this structure I have an Activity, a listview in this…
-
0
votes1
answer30
viewsOnitemclicklistener with Customadapter, java.lang.Nullpointerexception error:
Good Afternoon, I’m using a listview to display some images per url and cache them. So far, so good. But when I put Onitemclicklistener just to show Titulo with a message it gives the error…
-
0
votes2
answers416
viewsWhat is the difference between $('.botao'). on('click') and $(Document). on('click', '.botao')?
I did a search and could not find anything about (probably because I’m not sure how to search). Anyway, someone there knows? NOTE: I don’t want to know the difference between . click and .…
-
0
votes1
answer292
viewsSwitch to Fragment by clicking the button inside the Fragment
I have an Activity that has an empty Linearlayout that only serves to 'host' the Fragment. This Linearlayout (called layoutFundo) is the argument of Fragmenttransaction to which one of several…
-
0
votes1
answer102
viewsHow to do an onclick with update in the database?
I’m wondering how to make an onclick by clicking already do an update in the database
-
0
votes2
answers160
viewsDirectives
How to build a Custom Directive that works like v-on? Briefly the directive needs to have the same functionality as the v-on:click I tried things like: //App.vue: <h1…
-
0
votes1
answer348
viewsReferenceerror: ... is not defined
Hello, I’m having a problem with the Javascript I’m using, I’ll put the practical example I’m using, in the head of my HTML I have 3 different tag openings. follow: <script type="text/javascript"…
-
0
votes1
answer31
viewsHow to put a Function Arrow in on onclik
How do I place an Arrow function in an onClik since it is named after the variable? The following is an example of:…
-
0
votes2
answers2732
viewsEvents tagged with <select><option>
I’m trying to make a page with html+javascript, but I don’t know anything about php... Anyway, my question is this! I have created an options box, and when the user selects a certain option, I want…
-
0
votes2
answers1289
viewsView Div with specific content by clicking link
Good morning guys, I’m creating this topic because I performed a forum search and found this solution here. How to open a <div> by clicking on a <a link>? But I need a more specific…
-
0
votes1
answer1678
viewsonClick on dynamically created React components
I have a component user-defined called <Match> that is created dynamically within another component <Event>. But when putting onClick on the component an exception is popped. How to…
-
0
votes1
answer79
viewsJavascript: Hide button after "subscribe" event
People in this google script have a comment written "Add code to Handle subscribe Event." translating "Add code to handle signature event.". I want to know if there is a way I can put a code in this…
-
0
votes1
answer575
viewsJavascript Onclick
In the code below is caught the option value selected and used as link (href), but I need it to be used as onClick: <form action="" method="POST" role="form"> <li> <select id="bens"…
-
0
votes2
answers467
viewsOnclick Javascript not working with "line break"
I’m a problem, I take information entered by the user in the database and put it in a button with onclick for the user to click put it in a modal so that it can edit, I can not put straight into the…
-
0
votes1
answer312
viewsClick as if it were toggle or Hover
I’m having a problem with something similar to a legacy tooltip, what happens is that they did it in Hover this way: var elem = jQuery('#interrogacao_adicionar_cartao_div');…
-
0
votes2
answers1448
viewsPass PHP variable in onclick="history.go(-1)"
I’m trying to create a button that returns to the form to fix it, thus keeping all the content typed in the HTML for the user to correct the wrong information, but sending a variable PHP so I can do…
-
0
votes0
answers335
viewsError creating multiple buttons in XML (Android Studio)
I’m creating an Android app that needs to have 20 buttons and each button of this will open a different screen. The application compiles correctly, but when arriving at the screen that has the 20…
-
0
votes0
answers340
viewsError "Unfortunately Myapp has stopped" when clicking the application button
I’m running my app on Genymotion, developing on Android Studio. Every time I run my application I click on the button to register, but when I click I come across the following message "Unfortunately…
-
0
votes1
answer464
viewsPass data from Firebase Database to Intent and recover in another Activity
This is the code snippet of my Fragment in which I need to pass a parameter (id of Firebase DB) through an Intent generated by Adapter.setOnClickListener: ...…
android firebase onclick android-intent firebase-databaseasked 6 years, 8 months ago Adriano Junior 1 -
0
votes0
answers91
viewsDisable Onclick button that loads Disqus comments
So my theme has this "onClick" button with "comments" as its title. It serves to click and load my comments from Disqus, just below the post. The problem is: it gives error several times, showing…
-
0
votes1
answer55
viewsIndent table Cell value and move to a Second PHP screen
Hello, I have a need and I have a great difficulty with PHP, some I managed to help me, I am creating a table with database information, and inside a cell I am putting an Onclick to open a second…
-
0
votes1
answer179
viewsLine breaking with Onclick Javascript
I have a function, that when clicking changes an element, but also ends up breaking the line, I tried to solve using the preventDefault(), but without success. When clicked on the icon…
-
0
votes1
answer94
viewswithout quotation marks enough to pass a javascript html string
I am facing a difficulty, I have to create tags, which will have a function when clicking, the problem is that, I have to pass a string in the element in html ie, when calling the function and pass…
-
0
votes1
answer182
viewsBack to previous page : Electron
I’m using Electron to develop an application where your goal is to leave some selected sites there. Now I’m facing a problem that when I go to a link of one of the options that are in the…
-
0
votes0
answers151
viewsDuplicate call from onclick event in Delphi
When running the onclick event (from the btn_ImportarNFe button) the program calls the same onclick event again from the method call Nfe.EnviarEvento(StrToInt(IDLote)); from the second code snippet…
-
0
votes2
answers1925
viewsTake Input values and insert into Onclick
have a form and need that when clicking the button, I send parameters of what was entered in the input fields within the function url of onclick: <form action="whatsapp.php" id="send-whatsapp"…
-
0
votes2
answers213
viewscondition in onclick
I intend to create a onclick button insert into database. I have the following duties: Insert function: function inserir_registo() { var dadosajax = { 'Tipo' : $("#Tipo").val(), 'Prioridade' :…
-
0
votes2
answers468
viewsHow to use onClick in Javascript?
Guys, I’m banging my head on something: There is an HTML code, which makes a form. In this form there is an answer that I can choose from yes and nay. The answer below this, provides a field, IF you…
-
0
votes1
answer197
viewsCalling PHP function via a button in a modal
I’m displaying the amount of files in a directory, within a modal, I want to call a function in PHP when the user clicks the button "Erase", tried to use onclick , but it didn’t work. My code:…
-
0
votes1
answer121
views"onClick" and "onLongClick" functions are called with a single touch
I have a simple problem, but I cannot find a specific solution to this problem. Inside my application I have a Recycler View and in it I have two click events: one for simple touch and one for long…
-
0
votes0
answers27
viewsSQL Query Clicking on the image that brings the selected color inside the input
I updated the server: the form has stopped working. The image fires an onclick, which switches the image on the form slide (this works); and informs the id/value of the selected color, which goes…
-
0
votes1
answer247
viewsHow to resolve Uncaught Typeerror: Hidden is not a Function at Htmlbuttonelement.onclick?
I have a javascript file with this code: const newTopic = document.getElementById('topic'); const introduction = document.getElementById('introduction'); function hidden(){…
-
-1
votes1
answer690
viewsPHP does not run Onclick Return confirm
I’m having trouble running javascript inside PHP "echo", I’ve made some changes and the problem persists. Follow the code I’m using: echo "<a href='excluir.php?id_edital=" . $pegar['id_edital'] .…
-
-1
votes1
answer60
viewsProblems in incrementing a score / counter
Hello, good evening ! I am trying to create a score for a game, where it contains two different types of scores 2 and 5 points. My biggest problem is that I can’t constantly update the score value…
-
-1
votes1
answer37
viewsLink select>option with Onclick of the button. Game of Old
I would like to link my select box to the function that is called on on click. I have two options: Player v s Player and CPU vs Player ... the idea is that when someone selects "Player vs Player"…
-
-1
votes1
answer184
viewsVariavel is not defined (Javascript)
function RemoverForro(valor){ var valorForro = valor; } $(add_button7).click(function(e){ e.preventDefault(); if(l < max_fields7){ l++; $(wrapper7).append( '<div id="tipo_forro_div_'+ l +'"…
-
-1
votes2
answers124
viewsOnclick event in two different pages
I’m practicing in JS and decided to create a program... a barbecue grill. The point is, I created two pages index.html and the second so that when the user click the button calcular, it is…
-
-1
votes2
answers167
viewsRun PHP function with onclick()
Hello, I have a function that should be executed only by clicking the filter button, but the page already opens with the search, with the function executed. Onclick is already on the filter button.…
-
-1
votes1
answer89
viewsHow to copy the contents of a table to the clipboard
Good night. I’m trying to create a script that copies the text of <td> by clicking on it. Since the complete table has more than 2000 lines I am trying not to put commands directly into…
-
-1
votes1
answer79
viewsState returning late value in Click
I have a code from a memory game where a sequence of numbers is shown, and the user repeats it through a keyboard created. However, the click value is only captured after double clicking. I would…
-
-1
votes1
answer82
viewsHow to get the "value" of a select in Reactjs
I made the following code, I would like to take the value of the "value" of the select, (the car color and show in the H3 tag when the button is triggered) I tried to use .target.value but without…
-
-2
votes4
answers832
viewsCan I use onclick twice ?
I have a button and in it I need to use onclick to trigger the function (this) for javascript but I need to put sound on the button, what I do ?
-
-2
votes2
answers236
viewsSwap image with onclick - HTML and JS
I am developing a code to change the image when it is clicked, this with several Divs, ids to be exchanged for the same image. I even managed to change the first one, but the rest do not change,…
-
-4
votes1
answer86
viewsError when calling a function, Cannot set Property 'src' of null
Hello, I’m doing a project for study. When I call the function, the code presents an error. The only thing I want to do in this function is just swap one image for the other when clicking and so…