jQuery « Kevin Pajak – Interactive Web Developer/Designer – BLOG

Posts Tagged ‘jQuery’

How to log out a user who closes the browser window

Wednesday, February 10th, 2010

I would like to thank Brazilian software developer Daniel Melo for posting this code which helped me to solve a problem which was very pesky indeed, and in need of a solution. The problem occurred during a user’s logged-in session for a chat application I was building. This was the issue: the app is basically a live-chat client, which also shows all current users online, by name. If a logged-in user clicked the “Logout” link, all was good, no problem, his/her name was removed from the list of currently logged-on users. However, if the person just suddenly decided to end the chat session by just closing the browser and hitting ‘X’ (as I myself might do!), the user was still showing as currently online, and NOT logged out (obviously this is an annoying issue). (more…)

jQuery / Ajax live refresh

Saturday, January 30th, 2010

Running live, simultaneous beta tests using three different browsers for my wallpost app, with added jQuery/Ajax page refresh functionality. It is kicking some SERIOUS ass already (think: live chat possibilities, with saved record of all dialogues, that can be added to any page, threaded to any topic, etc) Yeah! ;) .

[Already, I’d like to thank programmer Srinivas Tamada for this rockin’ code!

And additionally, very special thanks to Maruf for helping resolve an annoying IE issue:

After I modified the code, the stupid forced-caching issue of IE (which was delaying or not showing the updated list of all the latest posts) managed to get resolved. Here’s my modified code of the function:

<script>

var refreshId = setInterval(function() {
$("#page_refresh").load(‘show-comments.php?v=’+ Math.random());
}, 500);

</script>

jQuery toggle with tooltips combo

Wednesday, September 9th, 2009

Structure containing BOTH jQuery toggle w. tooltips/image preview set up.

jQuery toggle

Tuesday, September 8th, 2009

jQuery toggle set up.

jQuery tooltips

Tuesday, September 8th, 2009

jQuery tooltips (with both text and image/screenshot preview) set up.