Questions tagged [mouseclick-event]

An event that is triggered when a Mouse input device is clicked

A MouseClickEvent is an event that is triggered when a button on a Mouse input device is clicked. The event contains information such as the particular button that was clicked, the length of time that the button was pressed, and how many times the button was clicked (single-click, double-click, etc)

577 questions
563
votes
21 answers

Disallow Twitter Bootstrap modal window from closing

I am creating a modal window using Twitter Bootstrap. The default behavior is if you click outside the modal area, the modal will automatically close. I would like to disable that -- i.e. not close the modal window when clicking outside the…
user1296175
  • 5,661
  • 3
  • 13
  • 8
144
votes
7 answers

How to simulate a mouse click using JavaScript?

I know about the document.form.button.click() method. However, I'd like to know how to simulate the onclick event. I found this code somewhere here on Stack Overflow, but I don't know how to use it :( function contextMenuClick() { var element=…
Nok Imchen
  • 2,656
  • 7
  • 28
  • 56
107
votes
5 answers

How to simulate a click by using x,y coordinates in JavaScript?

Is it possible to use given coordinates in order to simulate a click in JavaScript within a webpage?
RadiantHex
  • 22,589
  • 43
  • 141
  • 236
69
votes
13 answers

Attaching click to anchor tag in angular

I am trying to attach click event to anchor tags (coming from ajax) and block the default redirection. How can I do it in angular ?
39
votes
4 answers

Angular2 How to trigger (click) event without clicking

I want to pass data from HTML to the component so I've created an event like this:
월 8회 {{r.value['charge']}}
And in component:…
Lea
  • 1,055
  • 5
  • 20
  • 29
38
votes
9 answers

How to use jQuery to show/hide divs based on radio button selection?

I have some radio buttons and I'd like to have different hidden divs show up based on which radio button is selected. Here's what the HTML looks like:
27
votes
2 answers

Marker mouse click event in R leaflet for shiny

How can I receive a mouse click event on a marker in a leaflet map in R? I'm using the RStudio/leaflet and running through Shiny. I'd like to get the value of a marker (e.g., ID) and use that to update a sidebarPanel.
RCG
  • 271
  • 1
  • 3
  • 3
26
votes
12 answers

how to obtain mouse click coordinates outside my window in Java

I need to implement a class, using Swing, which can obtain the mouse coordinates when the user clicks anywhere on the screen. if I wanted to obtain the mouse coordinates inside my own window, I'd use a MouseListener, but I want it to work even when…
cd1
  • 13,928
  • 10
  • 43
  • 43
26
votes
6 answers

NSTableView: detecting a mouse click together with the row and column

I'm trying to detect when a mouse click occurs in an NSTableView, and when it does, to determine the row and column of the cell that was clicked. So far I've tried to use NSTableViewSelectionDidChangeNotification, but there are two problems: It…
bright
  • 4,298
  • 1
  • 30
  • 52
24
votes
6 answers

Prevent middle mouse click scrolling

I'm looking for a way to stop the middle mouse click from causing the browser to start scrolling, and showing the little scroll 'compass'. I have seen Disabling middle click scrolling with javascript however the solution is a bit more hackey than I…
elwyn
  • 9,351
  • 11
  • 38
  • 48
17
votes
1 answer

How to draw a point (on mouseclick) on a QGraphicsScene?

I have the following code to set up a QGraphicsScene. I wish to click on the scene and draw a point at the location I've clicked. How could I do this? This is my current code: MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), …
user189320
15
votes
2 answers

WPF: Button single click + double click issue

I have to handle both the single click and the double click of a button in a WPF application with different reaction. Unfortunately, on a doubleclick, WPF fires two click event and a double click event, so it's hard to handle this situation. It…
Hunsoul
  • 155
  • 1
  • 1
  • 6
14
votes
2 answers

Move Mouse to Position and Left Click

I'm working on an Windows Form Application in C#, Framework 4 (32 bit). I have a list that holds coords of the mouse, and I can capture them. So far so good. But at some point, I want to go to those coords and left mouse click on it. This is how it…
Mathlight
  • 5,847
  • 15
  • 58
  • 103
13
votes
1 answer

Google Maps API v3 : Click events not triggered in firefox for custom marker

have created a map that I'm trying to have function similar to 'My Maps'. I have two dropdownlists on the right side, based on the selection in those ddl's, you can add a custom marker / icon. You select a marker type, then click the '+' button in…
13
votes
1 answer

How do websites end up breaking middle-click functionality?

By default, middle-click will open a link in a new tab. Some sites end up breaking this functionality. Middle-click ends up being the same as left-click. Why does this happen? Is it because they program functionality for a click event, and…
John Bachir
  • 21,401
  • 22
  • 137
  • 203
1
2 3
38 39