javascript-events

Google Visualization Table: event on right click?

In a Google Visualization Table, there's an event on "select". Is there a way to know if the user used the right (as opposed to left) mouse button? I'd like to display a menu when the right button is pressed in a row. Thanks! ...

fire javascript event on object creation

Is there any way to fire an event when an object of a certain type is created? I have an <div> element with editableContent="true" and when the user presses enter within the <div>, a new <div> is created that takes up just that line. Is it possible to have an event fire whenever a <div> object is created within my original <div> object?...

Is there any possibility of two asynchronous Javascript function instances executing two blocks of code at the same time?

I understand that Javascript doesn't have multiple threads, but I'd like to know if the following code has any chance of breaking. My understanding is that unless an asynchronous function is called, such as setTimeout or an AJAX call, that once a block of code starts executing there's no way for it to pause until it completes or does ca...

Performing GET request before leaving page - Javascript

Hi folks, if a GET request is made as follows $(window).bind('beforeunload', function() { // GET request }); and the page is abandoned before the GET request is completed, will the destination server still process the request? Or will it somehow vanish? I would like to send a server data on "beforeunload" firing, but without ...

ckEditor - mouseup event not firing after setData

So I have a ckEditor loaded through javascript, then on the instanceReady event I add another event for mouseup... this works well and dandy until i use the setText property (I used both the jquery way and the javascript way). After that is set, the mouseup event no longer triggers. Not even after I set the event handler again. Relevant...

fullcalendar adding events from mysql json - adding eventClick returns blank page

I am pulling events into the calendar using JSON and php. I am know trying to add evenClicks or mouseOver events the the calendar and when I do I get a blank page. My JS knowledge is rather novice so at this point I'm stuck Heres my calendar script $(document).ready(function() { $('#calendar').fullCalendar({ header: { left: 'pr...

jQuery UI Datepicker altField .change function not working?

Can anyone tell me why the console.log line isn't getting run when I select a date with the jQuery UI Datepicker? Thanks for reading. <script type="text/javascript"> $(window).ready(function() { $(function() { $("#datepicker").datepicker({ altField: '#dateIntermediate'}); }); $('#dateIntermediate'...

Is there a onselect event for non-form elements?

Say I want to hide a span when the user highlights a bit of text containing that span, with the intention of copying that text on to his clipboard. For example: <p>The dragon <span class="tooltip">a large, mythical beast</span> belched fire at St. George.</p> I have found that in Firefox Mac, span.tooltip will disappear from view (i...

Eliminate question mark icon in iphone/ipad JavaScript's ontouchstart event

I am developing an iPhone/ipad app using HTML,CSS and JavaScript that runs on an embedded webkit browser. There's an image in the page that's attached to the ontouchstart event handler. Testing on a real iPad shows that whenever I touch the image on the page, a little question icon pops up, which I do not want. What is this little que...

What is the difference of placing the event listener on the HTML tag versus the BODY tag?

I was looking at google.com source and saw: <!doctype html><html onmousemove="google&&google.fade&&google.fade(event)"> I did not know the HTML tag could accept event listeners. What is the difference of placing the event listener on the HTML tag versus the BODY tag? Is there any difference in the event bubbling? ...

What's the best way to prevent a browser from displaying images until they are fully loaded?

I would like to set up a lean and mean image gallery, with thumbnails displayed inline. I'd like them not to windowshade in while loading, I'd like them to simply pop up or, if there's a way to detect their completion, use a jQuery effect like a quick fadeIn(). I imagine a line of code like: $(".thumb-image").whenLoaded(fadeIn(500))...

Jquery/Javascript Animation: Interesting Question

How would I go about making divs appear and disappear in sequential order? My plan is to have a 6 different divs: 1-6 appear in sequential order. Then after a couple of seconds, they will disappear (6-1) and reappear in sequential order again. ...

Trouble with jQuery event refreshing

Hi, I am using jQuery to make a custom carousel. After delivering a jCarousel implementation as part of a project, the test team have raised a lot of bugs and so I decided to write my own as I always find it difficult to find a plug-in that does exactly what I want (need) it to do. My current problem is that I can get it to scroll onc...

HTML page submission without redirection

Is there any method to submit an html form without redirecting from the current page without using ajax ? ...

How can I use getElementById for a control created in code behind?

I am trying to use the onmouseover and onmouseout event on a table td created on the client side, so that when the a user mouses over the table cell, a panel becomes visible, and when they mouse out, the panel becomes invisible. <table> <tr> <td onmouseover="ToggleVisibility('FileHeader', true);" onmouseout="ToggleVisibilit...

jQuery - stopping a hover event while dragging

I'm creating a drag and drop image environment, where if you hover over an image, a small menu pops up overtop of it. if you click and drag the image, you can reorder them. The problem I'm having is, I want the hover event to be disabled when you're dragging around. Currently if you drag an image around, it triggers all the hover menus ...

What is the best practise to not to override other bound functions to window.onresize?

How much I dig into JavaScript, I find myself asking that much. For example we have window.onresize event handler and if I say: window.onresize = resize; function resize() { console.log("resize event detected!"); } Wouldn't that kill all other functions which is connected to the same event and just log my message in console? If so...

How can I create a grabbing funtionality in my script like googlemap.

Hello, in googlemaps onmouseover, on can grab/dragg the googlemap. e.g http://code.google.com/intl/de/apis/maps/documentation/javascript/examples/map-simple.html May I use the same functions in my script or how can I creating the same functionality. Thanks ...

Mouse position - Cross browser compatibility - Javascript

Hi folks, working with the mouse within Javascript I have occasionally met the following event attributes: clientX, clientY layerX, layerY offsetX, offsetY pageX, pageY screenX, screenY x, y I'm wondering what their cross-browser compatibility looks like in general, as I have only found bits and pieces of info that I'm trying to pat...

javascript error in jssh in firefox 4.0b1

Using this javascript through jssh compiled and built for the new firefox 4.0 beta 1 returns an odd message. Here is the code (sorry if it's a little messy) In summary the code checks all frames of a firefox window which is a test page of our unit tests for a element that has an onclick which contains the phrase Goodbye Wonderful, inste...