dom-events Questions
3
Solved
I'm not even sure if this is possible, so apologies if it's a stupid question.
I've set up an keyup callback through jQuery to run a function when a user types in an input box. It works fine for E...
Theresatherese asked 6/9, 2011 at 8:20
7
Solved
I'm writing a Javascript script.
This script will probably be loaded asynchronously (AMD format).
In this script, I'd like to do nothing important until the window.load event was fired.
So I liste...
Pairs asked 13/11, 2012 at 16:27
2
Solved
I have the following problem: I use Javascript onclick event to change href of a link. It works like a charm but only if user just clicks a link. If "Open in new tab" feature is used for the link -...
Hebner asked 11/9, 2012 at 8:5
2
Solved
I am trying to override the browser save shortcut i.e. Ctrl+S to give the functionality of save in my web App , I am using Google Chrome... I tried keydown listener to observe the keycode but when ...
Levitan asked 15/12, 2010 at 5:31
8
Solved
I've read several question/answers on Stack Overflow and Googled the issue, I can't seem to get the event.state to come back with anything but null.
I got that it wont work with the jQuery event, ...
Regelation asked 19/6, 2012 at 0:4
7
Solved
Below I am creating an object in JavaScript. Within the constructor I am setting up an event listener. The problem is that when the event gets fired, this.prop cannot be found, and undefined prints...
Parenthesize asked 4/7, 2009 at 4:35
8
Solved
I'm using the onkeyup event on a form field in JavaScript, and I'm wanting to check if the key the key pressed is a numeric digit - i.e. 0 - 9, so I can then do something with the input.
<input ...
Homemade asked 9/9, 2009 at 21:7
2
Solved
I want to raise a click MouseEvent programmatically, for example, from an Angular Component to simulate a mouse click. Is this possible and how? I didn't find any existing question on this here.
T...
Careless asked 22/9, 2019 at 16:24
10
Solved
I'm curious if anyone knows how I would trigger a function to run if/once the user finishes selecting text on the web page? I would like the user to be able to select text, and after a short delay(...
Lipscomb asked 16/9, 2010 at 22:26
4
Solved
I understand that an event has two modes -- bubbling and capturing.
When an event is set to bubble, does Javascript checks up to "document"?
When an event is set to capture, does Javascri...
Hinkle asked 25/9, 2012 at 4:14
6
Solved
I have been unable to figure out how to do a video seek (automatically advance to a certain point in the video) in the Netflix video player running in Chrome. The currentTime property can be read b...
Aretta asked 8/2, 2017 at 4:56
5
Solved
In the traditional way to add event listener:
function getComboA(sel) {
var value = sel.options[sel.selectedIndex].value;
}
<select id="comboA" onchange="getComboA(this)"&...
Unrepair asked 19/8, 2012 at 5:42
4
Solved
I want to detect when a node (nodeX, say) is no longer available, either because it was deleted or because its parent (or its parents parent) was deleted.
So far, all I can think of is to use Muta...
Samara asked 5/7, 2017 at 20:57
6
Solved
I am trying to get the form data key-value pair object when the form is submitted, using the new FormData() constructor. But it always returns empty data.
I have already tried event.persist() to a...
Clothesbasket asked 20/5, 2019 at 5:56
2
Solved
I was just playing around with event listeners with DOM and Javascript and did notice this:
function chained(msg) {
console.log(msg, event);
}
function onClick() {
chained('the body was clicked'...
Elma asked 21/6, 2011 at 13:58
11
Solved
Is there a simple way to do something along these lines:
JavaScript:
if(document.getElementById('button').clicked == true)
{
alert("button was clicked");
}
HTML:
<input id="button" type="s...
Bainmarie asked 7/5, 2010 at 11:33
4
Solved
How can I stop the propagation of the click event so that the browser will NOT redirect?
<a id="theHref" href="http://stackoverflow.com/">SO</a>
<script>
docu...
Mages asked 28/6, 2015 at 9:35
8
Solved
I have this scenario, where when parent element is clicked, it flips to show a child element with different colours. Unfortunately, when the user clicks on one of the colours, the 'click' event on ...
Kovar asked 1/6, 2016 at 12:23
3
Solved
What is the difference between the onpointerdown and onclick event handlers?
Are there any practical differences? Are the events not propagated the same up the DOM tree? Are there some devices that...
Cultivated asked 9/11, 2021 at 14:19
17
Solved
Is there a way to add long press event in a React web application?
I have list of addresses. On long press on any address, I want to fire event to delete that address followed by a confirm box.
Fumed asked 1/1, 2018 at 10:39
2
Solved
While working around to boost performance for progressive web apps, I came across a new feature Passive Event Listeners and I find it hard to understand the concept.
What are Passive Event Listene...
Halbert asked 9/6, 2016 at 9:21
6
Solved
There are some events that I can use for handling drag & drop:
https://developer.mozilla.org/en/DragDrop/Drag_and_Drop
there is a drag event, which is fired during the time the element is bei...
Tobit asked 23/6, 2012 at 12:36
9
Solved
This is a dynamic JavaScript application I am working on. I have many <a> anchor elements that have a class. When that class is clicked, something should happen. This works fine in Firefox, C...
Devan asked 6/6, 2014 at 8:47
19
Just wondering if Google Chrome is going to support window.focus() at some point. When I mean support, I mean have it work. The call to it doesn't fail, it just doesn't do anything. All other major...
Caudle asked 3/5, 2010 at 14:9
14
Solved
In the following example code, I attach an onclick event handler to the span containing the text "foo". The handler is an anonymous function that pops up an alert().
However, if I assign to the pa...
Eristic asked 27/2, 2009 at 17:43
1 Next >
© 2022 - 2025 — McMap. All rights reserved.