javascript-events

Mobile Safari Event Issue

I have designed a website with a menu that is initially invisible. When the user clicks on a button, the menu becomes visible. There are two ways for the user to hide the now visible menu: Click the button that caused the menu to become visible Click anywhere on the webpage that isn't the menu The way I have coded the second option i...

What happended to DOM level 1?

So, what happened to the DOM level 1? For example there are DOM level 0 events like this window.onload = func; element.onclick = func; and there's DOM level 2 (and now even level 3) events element.addEventListener("click", func, false); But no mention anywhere about DOM level 1 events? Was it like with Lesuire suit Larry 4 that g...

Get Parent node name

How to get the parent node name of the checked child node of ASP.net TreeView Control using jquery/javascript ? $('#<%=treeMeasures.ClientID%>').find('input[type=checkbox]').each(function() { alert($(this).parent().text()); }); ...

How to use JavaScript to dynamically update the Bugzilla Additional Comments textarea?

I am customising Bugzilla and I need to update the text in the Additional Comments text area on the bug editing page. This text will need to be changed dynamically depending on which status the user selects from the drop down menu. For this im hoping to use the onChange event. Has anyone any suggestions on how to implement this? ...

javascript event handler arguments

I have the following Javascript code: var ans_el = document.createElement( 'input' ); ans_el.setAttribute( 'id', unique_int_value ); ans_el.setAttribute( 'type', 'radio' ); ans_el.setAttribute( 'name', 'group' ); ans_el.setAttribute( 'value', 'myValue' ); ans_el.onclick = myFunction( this.id, this.value ); // Add ans_el to DOM. funct...

Drawing multiple images to a canvas using image.onload

I am running into problems when trying to draw a large 2D array of images onto a canvas. Using a separate program, I'm taking one big image file and breaking it up smaller, uniform pieces. I'm using the 2D array to represent this "grid" of images, and ideally when I assign the src of each element in the grid, that image would be drawn to...

How do you register an onclick event while having onmouseover using javascript

I have a function that tracks the user's mouse to show them visually where they are on an x,y grid. When the user's mouse is over the image, a function is called via onmouseover="gridFunction();" The problem is that I want to record the user's click (onclick or onmousedown) as they move around the grid image. So I'm trying to stack an o...

Javascript and php values toggel

I have index.php page and I have this there $pv->showHidden = isset($_POST['showHidden']) ? intval($_POST['showHidden']) : 0; $pv->sendHidden = isset($_POST['showHidden']) ? 0 : 1; and then I have this <input type="image" id="btnShowHidden" src="images/hide.gif" onclick="showHiddenRecords(<?php print $pv->sendHidden; ?>);" /> I...

how to respond to a Javascript event only if it is fired once and then not fired again during some time period?

Hello, In my application I listen to the Google Maps API 'bounds_changed' event to send an ajax request to update some div on the webpage depending on the new boundaries of the map: google.maps.event.addListener(map, 'bounds_changed', function() { // here goes an ajax call } The event 'bounds_changed' is fired with a high frequency...

The use of a lightbox and the click events

I'm using a lightbox for image viewing and I just have to use rel="lightbox" inside <a>. The problem is that my site has AJAX for every link, so I coded $('a').live('click', function() { $('#content').load($(this).attr('href')); return false; }); This way, every link turns to be an AJAX request. What is pissing me off is that ...

How to identify browser tab closing using javascript or jquery?

How to identify browser tab closing using javascript or jquery? I have to give a confirmation message when user click on the browser close button. If user press yes button I have to load another page on the same tab. if press cancel. then close the tab. any body knows the scripts for this functionality. Please help me :( ...

Java Script: mousestop event

For some feature, I am working on mousemove event. mousemove event listener is invoked a number of times with in a single linear mouse gesture that is not required. I need to implement a custom event that will be invoked when mouse will stop its motion. I have a guess that it can be implemented on top of mousemove with some delay feature...

Generate a normal Link (<a href="...">) in ExtJS

Hi, I'm struggling with a really simple problem here. I want to generate a normal link in frontend but it seems to don't work somehow. Here is the code i use for the generation of the link (the link was a button before which obened a new window with a specified URL on click). { xtype: 'button', id: 'PrintTool', tooltip: 'Printer...

Problem in editable table in HTML

Hi, I have a table in HTML. I have made this table as editable by using Javascript. When the user clicks a cell, it will become editable. The problem here is, when the cell is already editable, if the user again clicks on the cell ...., some tags and other things appear.i.e. new text boxes appear for every click. How this could be preve...

Notify me when the Flash movie is done playing

Guys, I'm new to working with flash and have a quick question about embedding flash with the SWFObject.js file. I can successfully embed an object and play it, but what I'd like to know now is if there is a way that I can be notified when the movie is done being played without editing the flash file itself, since I have no real way to ...

how to activate the background div element?

i have two div elements ,box_1 and box_2: <div id="box_1" style="position:absolute;top:0;left:0;width:500px;height:500px;border:1px solid gray;z-index:2;"> </div> <div id="box_2" onclick="alert(1);" style="position:absolute;top:0;left:0;width:300px;height:300px;background-color:red;z-index:1;"> how to activate me?(do not inner #box_1,a...

problem with onClick() and middle button on mouse

hello. i made this : <a href="<?=$rowz[0]?>" onClick="countLinks('<?=$row[6]?>','<?=$indexl?>')">[Link <?=$j++?>]</a> the problem is that it doesn't work with middle button on IE or firefox. in fact, the countLinks using middle button is called only with chrome. i think i need a Jquery function like mouseup event, just i don't know h...

JQUERY, Adding an Event Listener to Items in an iFrame?

Given an iFrame with throughout the iframe... Is it possible to add an event listener with jquery to trigger an ALERT anytime the user moves their mouse over .fineme in the iframe, from the top/parent window? ...

Date(dateString) returning invalid date in FF

The page works fine in Chrome, but I have this one minor error in FF and a different problem in IE. Assistance with either of these issues is greatly appreciated. Since ive been stumped in the FF error the longest, I'll start with that one: Here's the code: http://truxmapper.appspot.com/sched.html The date picker selects a date usin...

Catching any click performed using jQuery

Hi folks, the noob way to do it I guess would be $('*').click(function(){...}); But is there any way I can catch any type of click, without having to register a listener for every object in the DOM? Help would be amazing. =) ...