javascript-events

How to delete data from database when session dont exists - PHP

I'm developing a chat module for my application... 1) I'm opening a window for users to chat, is there way that when users close the chat window, I can update status of that record...i mean event for the closed browser ? 2) I know that default session time is 24mins, so after 24mins of inactivity, user will be kicked out from the s...

jQuery: Event, when User stops scrolling

Hi, I'd like to do some fancy jQuery stuff when the user scrolled the page. But I have no idea how to tackle this problem, since there is online the scroll() method. Any ideas? ...

Firefox addon to do something everytime a user hits Enter in the address bar

Hi, I'm trying to write an extension that monitors every time someone types hits enter when using the address bar. The steps would be something along the lines of User types in a bunch of text in the address bar and hits Enter My addon springs to life and recieves what the user typed in My addon then decides what to do with the string...

yui2 and yui3 events

Can the yui3 construct of Y.on() be used to setup listeners for events on yui2 widgets, or do they simply use separate event systems? ...

Cannot understand node.js.

Hi, From someone with few experience in JS, what do you recommend for learning Node.js? I read a lot in the forum about event driven, non-blocking , async, callbacks, etc but I don't know what's that! Where can I learn the basics in order to understand all that terms and in the future, node.js? Thanks! ...

add onclick event on various elements on the basic of css class.

I have various elements on a single page. They share a single class. I want to add a onclick event on all those elements using prototype. For id i can do something like this_ Event.observe(window, 'load', function() { $('id_of_the_element').addEventListener('onclick',any_function,true); } ); This is good if we have id of the el...

Project ideas to master JavaScript

This question is the following of my other question here: http://stackoverflow.com/questions/3707746/cannot-understand-node-js I decided to learn JavaScript, however and in spite of I learn by doing, I don't find anything I can be doing in order to learn JavaScript. What projects do you recommend me to start? What cool things can I do ...

chrome.extensions.onRequest.addListener won't debug?

I've searched everywhere for a solution to this...even Google's own code example doesn't work. Someone please explain to me how to debug into event listeners or at least how to make Console.Log() work! Looking at Google's example : http://code.google.com/chrome/extensions/messaging.html Here is what I'm testing...on my background.js (r...

javascript timeout function

javascript time out function is settimeout(fun, 3600); but what if I dont want to run anyother function. can i do settimeout(3600); ? ...

How do I bind to the scroll wheel when over a div?

I'm creating an image editor in the browser and I've got the code for all of my controls done. Now I'd like to map hot keys and mouse buttons. the keyboard is easy, but the mouse is not. I need to detect when the mouse is over the canvas div and when the mouse wheel is moved above it. The mouse over part is not hard, its binding to the ...

javascript content slider to stop on mouse over start on mouse out

hi, i have a problem with javascript. code below belongs to featured content slider and it pauses when mouse is over a pagination link. what i want to do is restarting the slide.. //** Featured Content Slider script- (c) Dynamic Drive DHTML code library: http://www.dynamicdrive.com. //** May 2nd, 08'- Script rewritten and updated to 2.0...

How to cancel onblur event of a control in javascript?

Hi, I am transferring the focus to a control on onblur event of a dropdown, the focus is transferred to the desired control and also the onblur event written for that control is getting executed which I don't want. How do I prevent this from happening? Thanks Kishore ...

Advice on creating a micro-framework in JavaScript

Hi, I'd like to know what are the steps required to create a framework on top of node.js. I believe this can be a good way to learn, that's why I'm doing this! I've been checking other micro-frameworks and bigger frameworks but I'm not being able to understand where to start. I'd like your advice on this. Thank you. Edit: MVC Framewor...

Detecting rendering completion in Webkit-based browsers (Chrome, Safari, etc)

From page Javascript, is there any way to know when a Webkit-based browser (particularly interested in recent Chrome, but a generic solution would be nice) has finished drawing the page, and/or has finished resolving all styles? Mozilla browsers have the MozAfterPaint event that's quite handy for this sort of thing. ...

Append Style to DOM not Replacing Existing

How can I append style element to DOM without eliminating existing style on the item (eg color, text-align, etc). The event calls the function, but the problem is 'Style' gets completely replaced with the single item instead. I have simple code triggered on event: function changeback(onoff) { if(onoff){ docum...

Remove eventlistener in Javascript after event ocurred?

There are 24 div-objects waiting/listening for a mouse-click. After click on one div-object, I want to remove the eventlistener from all 24 div-objects. for (var i=1;i<=24;i++){ document.getElementById('div'+i).addEventListener('click',function(event){ for (var z=1;z<=24;z++){ document.getElementById('div'+z).rem...

Need help with Javascript "mouseover" and "mouseout" events

Consider the following code: HTML: <div class='a'></div> <div class='b'></div> CSS: body { position: relative; } .a { position: absolute; left: 100px; top: 100px; width: 100px; height: 100px; background: #777; } .b { position: absolute; display: none; background: red; } JavaScript: $(functi...

calling objective c viewcontroller from javascript

Hi everyboy, I am using jqplot(javascript library) for charting in my iphone application. I can load pie-chart on webview successfully. But I want to call obj c viewcontroller based on value changes in javascript (value will be changed when on-click event fired on the different portion of the piechart). I dont know how to do that. please...

How to call a function (non AJAX) after another function (non AJAX) finishes in Dojo?

Hello Stackers, This is not an AJAX request/response callback question... I am building a grid using Dojo 1.5. I am trying to dojo.connect expand/contract buttons with a function. My problem is that the grid.startup() method seems to take a while after being called before the actual DOM nodes are created, so when I call dojo.query no...

On Text Highlight Event?

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(or immediately, at this point it doesn't matter much) an overlay button appears near the text that the user can then click and I go back and r...