Questions tagged as 'onclick'

2
answers

onClick on edittext that can not be editable

How to make an event click on an edittext, enabled="false"? (I could not do without focus being in edittext, enabled="true") Or, an event clicks on an edittext that can not be edited. Code below: .... <android.support.design....
asked by 09.11.2016 / 15:11
2
answers

mount url to open new tab with parameters passed by onclick

Good evening, How to make a function to handle past parameters in onclick to mount a url and open it in new tab? example <button onclick="javascript:parent.funcao1('TESTE','ABCD', 'eydub21lJzonam9hbycsJ2lkYWRlJzogJzI5J30=');">TESTE</b...
asked by 10.04.2018 / 02:07
1
answer

OnItemClickListener to open an activity

I'm having the following problem, I'm using a list view and a search view, and when I click on an item, I'd like to open an activity and display a toast. So far so good, when I search and click on item 2 instead of opening activity "2" from id "...
asked by 25.08.2017 / 22:40
2
answers

OnClick type image

I'm having trouble making a onclick event work. I would like to change an image of an input type image. I did a test with a simple alert and it was not called the function either. Here is part of my code. <div class="bg-secund">...
asked by 06.06.2016 / 06:08
1
answer

Add CSS when clicking a button that goes to another page

I need to add height in a div when I click a button, but it has a but this div is on another page and that's what I'm not able to do, I'll show you how I did it in the code below if anyone can help. p> CODE $('.close-reveal-modal').click(f...
asked by 23.05.2015 / 00:27
1
answer

Onclick to close a modal without reload

This button closes a modal, but must be done without causing a reload. How is it? <button type="button" class="close" data-dismiss="modal" aria-label="Close" onclick="javascript:window.location.reload()"><span aria-hidden="true">×&...
asked by 11.09.2018 / 16:47
1
answer

I can not return onclick property to a button with its parameters

I created a simple game of the gallows, where within several multi-word themes a secret word is chosen randomly. The user has at his disposal 27 buttons, each with a letter of the alphabet and clicking a button calls a function (with 2 parameter...
asked by 30.05.2018 / 17:09
1
answer

How do I assign multiple events to the same button?

I have a layout where I can only have one button and need to use the same layout for multiple onClick events in a cardView. How do I achieve this? public void onClick(View arg0) { switch (arg0.getContext()) { case ge...
asked by 27.12.2017 / 22:18
1
answer

I can not update the value of a String when I click on a particular button

I'm doing a project for a calculator and I can not update the screen when someone presses the number 7, for example. Here is the code: HTML: <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" con...
asked by 11.12.2017 / 20:47
3
answers

How to capture any button through OnClick? [duplicate]

I have ten Buttons in my XML and want to change the Text of the button that the user clicks on. I implemented a View.OnClickListener in my Activity and my onClick looked like this: @Override public void onClick(View view) { Bu...
asked by 29.12.2017 / 00:38