javascript-events

How can I delay checkbox postback?

I have an ASP.NET page with Javascript. I have some checkboxes and I want to give the user time to check and uncheck more then one box before the postback... so when the user tick/untick a check box the postback happens after 5 seconds. How can I do this? tryed different methods found online but all incomplete or wrong. Thank you! ...

How to start a new line from JavaScript?

I have created this "shell" in jquery: Code: link text Demo: link text I need that every 100 chars, the prompt go in a new line below. How can I do this ? ...

javascript :OnMouseout event being called when i move the cursor over an element without going OUT of the element

I have an image in a page and in the "onmouseover" event of that image I will call a javascript function to show a tooltip and in the "onmouseout" of the image, i will call a method to hide the tooltip.Now i found that when i place the cursor on the image,its calling the method to show the tooltip div.and if i move the mouse WITHIN the i...

Add an event listener to an object that is added to the DOM via AJAX

Hi There, I've got a set of checkboxes that are added to a document via an Ajax call <input type='checkbox' checked class='import'> <input type='checkbox' checked class='import'> <input type='checkbox' checked class='import'> <input type='checkbox' checked class='import'> <input type='checkbox' checked class='import'> I've got a few...

jQuery: Why would trigger not fire from a JS object?

I've been implementing a form of a publisher/subscriber design pattern in jQuery. I'm basically building classes in Javascript utilizing CoffeeScript that serve as components on my page. i.e. Navigation, DataList, etc. Instead of having DOM elements fire events, I have instances of these classes that use trigger on themselves to send cu...

How to implement an 'onVisible' event in Javascript?

Is there any technique or set of techniques that can be used to implement what, in effect, would be an onVisible 'event' in JavaScript? I would like my JavaScript to detect when an element in a web page, such as a paragraph of text, or an image, becomes visible in a browser window as a user scrolls down a page. I would also like a corre...

Disable keydown during animation

Hi, I'm using the following code to enable the user to show or hide a photo description (#photoinfo) and a menu (.slidetable) using the up and down arrow keys. If one of these two divs is already open, pressing the opposite arrow closes that div before opening the other. $(document).unbind('keypress'); $(document).keydown(function(even...

jQuery event sequence ....

Hello, I have a main screen with 2 parts a list and a detail section. Via a button, I open a modal dialog. On this modal dialog, 2 buttons one for save and the other for cancel. After the save, I call a function to refresh the list on the main screen and close the dialog. The problem, sometimes, the list is refresh before the end of the...

Preventing Links before jQuery is Loaded

Hi Guys, How can i prevent links on click event before jQuery is loaded? The reason is i have few links that make AJAX calls through jQuery ajax functions and if user click them before jQuery framework is loaded the browser cant trigger jQuery ajax function and will follow links href="..." Thanks. Edit: Can i use this? <head> ... <sc...

Firing events between an iframe and it's parent using YUI

I have an iFrame that is firing an event that I want the parent page to pick up. Essentially the inverse of this question. I can pick up the event inside the iFrame, so I know it's firing, but nothing happens in the parent. I'm using YUI 3 so any answers based around this get a double-thumbs up, but all help is greatfully received. Tha...

cancel jquery method on mouseleave

Hi i have a method that changes the background of a div every few seconds, Like a carousel, when the user rolls over a certain bit of text. on the #h2Create mouseleave event i want to cancel the changingCarosel method(stop the carousel from playing). How can i do this?? $(document).ready(function () { $("#h2Create").mouseenter(fun...

Is there a general mechanism to timeout events in node.js?

I am learning node.js and most of examples I can find are dealing with simple examples. I am more interested in building real-world complicated systems and estimating how well event based model of node.js can handle all the use cases of a real application. One of the common patterns that I want to apply is let blocking execution to time...

How to write this crawler in javascript ?

The idea is very simple: Imagine a simple white page with a form with a single input tag ( like google homepage ). When I insert a link of a blogpost in this form, then the javascript-crawler search the first image in the webpage of the blogpost ( through ajax ), show it in the white page and save it on my server. This crawler works li...

capture dropdown/comboboxes mouseout events on document

I have a document where I'm listing to mouse out events on the document. This is working great, and I'm able to do a lot of determination that cancels the mouseout event in specific scenarios, but for events that seem to fire when the mouse hovers over the choices in a dropdown/combobox. Basically, I need to detect the event of moving ...

Which event should be used when you select text from windows default auto complete.

Hi I have requirement for currency conversion. I am making use of "onKeyPress" "onChange" event to call the javascript function. It works fine when you enter text to textboxes. I am getting problem when the user selects the text from auto forms. Thanks in advance. ...

replay script as used in many ad's

I need a script that shows replay on the top right or left corners just like in many ads.I googled it but didnt find anything useful. What i have is a set of images that run in a slide show kinds just like online ad's and when the ad ends "Replay" should appear on the top which on click runs the ad again.Pleae help !! EDIT: iam using sw...

How to get the selected tab of the browser using javascript?

Hi all, How to get the selected tab of the browser using javascript? Thanks, Gaurav ...

jQuery click action does not trigger onclick attribute

I am having problems getting a function that clicks all search matched checkboxes. The click event seems to fire, but no checkbox gets checked nor is myFunc() called. It works perfectly when clicking each checkbox manually, but who wants to do that with 40+ checkboxes - not my users. You may wonder why I use a div-onclick instead of dir...

Does Parent window (The first page of my site) gets focus when closing childs till i return to it?

Hello all, In my system i have a main page, what when clicking on any element on that page a new page is being open, in some cases (button click on child page) from the child page will be open a new page, and so on...when i deside to close any child i need to close all levels to the top and refresh the top level page becouse on the child...

Is there a way to detect, through browser javascript, multi-touch events of a trackpad, magic mouse or magic trackpad on a mac?

I know there are many ways to do so directly on the iPhone (jQtouch), but I'd like to detect those events in my computer's browser. ...