>All Tutorials 
Ajax and .NET Ajax and .NET RSS XML
Ajax and ColdFusion Ajax and ColdFusion RSS XML
Ajax and Java Ajax and Java RSS XML
Ajax and PHP Ajax and PHP RSS XML
Ajax and SOA Ajax and SOA RSS XML
Ajax Goodies Ajax Goodies RSS XML
Ajax Tool Ajax Tool RSS XML
Facebook MockAjax Facebook MockAjax RSS XML
Google Web Toolkit Google Web Toolkit RSS XML
JavaScript Framework JavaScript Framework RSS XML
Ruby on Rails Ruby on Rails RSS XML
Technique Introduction Technique Introduction RSS XML
Without XMLHttpRequest Without XMLHttpRequest RSS XML
Yahoo! UI Yahoo! UI RSS XML

In site messaging (IM) with AJAX and Java - message player messages chat string window req public

 
Registered tutorials: 501
Registered Users: 33213



Rating: 3.67 out of 3 votes cast


  
Category: Ajax and Java

Tags Map

action add ajax align allplayers append bean blog built chat chatwin check clear client code completes create domessageopenwindow entry equals event false feel free fromid fromname function game getid getparameter getsession handler hash hashmap httpservletrequest httpservletresponse id im implementation import incoming innerhtml input ioexception java javascript join json key leave left list message messages messaging method multiple nexttoken null object observe observers open page parameters part player players pm popup post private privatemessages prototype public put recipient register req request resp retrieve return rss sample save send sending server servlet servletexception session set sinkmyship site source st string system text throws tutorial unique user users var void waiting wid window windows

Keyword Cloud Navigation Map

In site messaging (IM) with AJAX and Java

Digg this   Post to del.icio.us

Abstract: This is another sample tutorial from sinkmyship.com web game code. This feature is pretty unique as I have not seen it implemented on many other sites.

The idea is pretty much like the meebo (which I love) or like instant chats on many support sites (such as raqspaces implementation), but with a twist. This would be an intrasite communication relay created using AJAX and not the applets which are commonly used for this. In this sample I will show implementation using prototype windows, prototype, and some custom JSON code.

For the front end you need some kind of popable windows, and since I don’t really like external pop-ups, I’ve built in page popups using prototype windows. If you are unfamiliar with this project, then it check out as soon as you can. Using prototype windows allows a bunch of niceties that are painful to build on your own, such as movable, closable, and minimizable windows, window top level manager, scriptaculous effects, and more. In our case they are linked to the players who are already on the site, and they are forced open when a player wishes to message another player, by clicking on the “talk” icon:

player list

Read Full Tutorial...



Reviews:

Rate and Review This Site

No reviews yet


Statistic Information About this Resource:


Total Hits: 466
Unique Hits: 378


  Daily Weekly Monthly
  Unique Total Unique Total Unique Total
Average 0.2 0.2 0.6 0.9 4.8 5.6
Current 1 1 1 1 1 1
Previous 0 0 1 1 5 8
Nov 30 0 0 2 4 3 4
Nov 29 0 0 0 0 2 2
Nov 28 0 0 2 3 2 3
Nov 27 0 0 0 0 5 6
Nov 26 1 1 0 0 0 0
Nov 25 0 0 0 0 0 0
Nov 24 0 0 0 0 2 2
Nov 23 0 0 0 0 28 30
Highest 5 10 15 17 35 47


Script Execution Time: 0.51624 | SQL Queries: 10 | Members: 501
Ajax Tutorial Top List - Powered by Aardvark Topsites PHP 5.1.2