Skip to content
Advertisement

Tag: dom-events

Select Radio Button if a Dropdown is Selected

I’m wondering how I can use JavaScript to accomplish the following: I have an input area with five dropdownlists, and each one has a corresponding radio button. When a dropdownlist is clicked to make a selection, I would like the radio button paired with it to become checked right then. Any help would be appreciated. Answer Its kind of simple

Making sure I get a mouse up event for every mouse down

The code below draws a rectangle on every mouse move after the mouse button is pressed. When the user releases the mouse it should stop drawing. I am trying to figure out how to make sure that drawing stops if the user releases the mouse outside the canvas element. I thought that I could accomplish this by setting onmouseup event

How do I use a function through iframe?

I have a web page which has a form at the top and a table at the bottom. The form allows users to submit info and also upload an image, the form’s target is the iframe, which is set height=0 width=0. Reason I did this was to prevent the page from refreshing and going to the action page assigned. The

DOM change event for Opera

So far I found how to do it in Chrome, the DOMSubtreeModified event: Is there a JavaScript/jQuery DOM change listener? Apparently it works in Firefox and IE 9 too. Do you know solutions for detecting DOM changes in other browsers such as Opera? And maybe older versions if IE, because I’m sure the event above doesn’t work in IE 6-7-8…

How can I reduce slowdowns from mousemove event?

I’m running a relatively simple function (update a span’s innerHTML) on mousemove. The application is a Leaflet map. When the mouse is moving, there is palpable lag when zooming, panning and loading tiles. I only need to update the span about 10-20 times per second at most. (See here for the page in question; the update is for the X/Z

Advertisement