Welcome!

Coach Wei

Subscribe to Coach Wei: eMailAlertsEmail Alerts
Get Coach Wei via: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn


Related Topics: RIA Developer's Journal, AJAX World RIA Conference, CEP on Ulitzer

RIA & Ajax: Article

Real-World AJAX Book Preview: Window Event Handling

Real-World AJAX Book Preview: Window Event Handling

This content is reprinted from Real-World AJAX: Secrets of the Masters published by SYS-CON Books. To order the entire book now along with companion DVDs for the special pre-order price, click here for more information. Aimed at everyone from enterprise developers to self-taught scripters, Real-World AJAX: Secrets of the Masters is the perfect book for anyone who wants to start developing AJAX applications.

Window Event Handling
The JavaScript file handles various window-related events such as resizing the window in response to mouse-drag events on the four edges, maximizing the window or closing the window in response to mouse-click events, or moving the window in response to mouse-drag events on the title bar. On the other side, the JavaScript file also fires window events to the toolkit's event management system so that if a listener is registered for a certain window event, the listener can be called.

Window Widget API
The JavaScript file also provides an API for developers to program this window object, such as setting the window title or resizing the window programmatically. The code below lets developers set the title, status, and icon of a window object:

Listing 15.3

function _nWindowSetTitle(title)
{
   this.title=title;
   if(!this.wTitleText)
   {
     requestManager.request(this,"setTitle",25,new Array(title));
     return;
   }
   this.wTitleText.innerHTML=title;
}

function _nWindowSetStatus(s)
{
   if(!this.wStatusText)
   {
     requestManager.request(this,"setStatus",25,new Array(s));
     return;
   }
   this.wStatusText.innerHTML=s;
   this.statusText=s;
}

function _nWindowSetIcon(iconURL)
{
   if(!this.wIconImg)
   {
     requestManager.request(this,"setIcon",105,new Array(iconURL));
     return;
   }
   this.wIconImg.src=iconURL;
   this.winIcon=iconURL;
}

AjaxWord Client Application Logic
AjaxWord does a significant amount of processing on the client side for application performance reasons. With a lot of code on the client side, applications can deliver better performance. However, such applications must be designed and coded carefully to avoid code maintenance problems.

The abstraction of UI widgets into a generic AJAX toolkit certainly helps code maintenance. AjaxWord also uses an object-oriented, event-driven approach to develop the application's client-side logic to manage and maintain the client-side code.

All client-side logic resides in two JavaScript files: nwWord.js and nwWordMenuListener.js. The first JavaScript file defines the application-wide logic while the second one responds to menu and toolbar events.

Loading the Application
For applications that have a significant amount of code on the client side, developers have to consider how the application is being loaded. Otherwise users will think the application is slow and abandon it.

AjaxWord requires a significant amount of initial download (several hundred kilobytes, dozens of HTML and JavaScript files, and many image files). This download process can take anywhere from a few seconds on a fast connection to 40 seconds on a slow dialup connection. To engage the user and improve perceived performance, AjaxWord uses a progress bar to indicate the loading progress so that the user knows the status and gets constant visual feedback, as shown in Figure 15.13

AjaxWord uses the code snippet below to update the progress bar and the status message. This code snippet follows each JavaScript file declaration statement so the "loadProgress1()" method will be executed every time a new file finishes loading:

<SCRIPT TYPE="text/JavaScript">loadProgress1();</script>

This way the user sees the progress being made as the application loads. Listing 15.4 is the loading page for AjaxWord:

Listing 15.4

<html>
<head>
<title>Progressbar</title>
<SCRIPT TYPE="text/JavaScript" SRC="../client_lib/is.js"></SCRIPT>
<Script TYPE="text/JavaScript">
   var nexArray=new Array("Event Synchronization",
   "Request Management","Object Management","Event Management",
   "Drap and Drop","Application Infrastructure","Advanced Windows System",
   "Server Communcation","Cascade Menu", "Interactive Dialog",
   "Empower the Next Generation Web","Web-based File Management",
   "Messaging","Empower the Next Generation Software",
   "Web-based Word Processing","The Webpage is the Software",
   "Extending Your OS to the Web");

   var currentProgress=0;
   function loadProgress1() {
     currentProgress++;
     var pro=Math.floor(currentProgress*100/nexArray.length);
     if(pro>99) pro=100;
     pro=pro/100;
     if(currentProgress>nexArray.length)
     currentProgress=nexArray.length; if(is.ns) {if(window.progress) progress(pro);}
else { if(parent.progress) parent.progress(pro,nexArray[currentProgress-1]);} } </
script>
<SCRIPT TYPE="text/JavaScript">loadProgress1();</SCRIPT>
<SCRIPT TYPE="text/JavaScript"
   SRC="../client_lib/JEvent.js"></SCRIPT>
<SCRIPT TYPE="text/JavaScript">loadProgress1();</script>
<SCRIPT TYPE="text/JavaScript"
   SRC="../client_lib/NRequestManager.js"></SCRIPT>
<SCRIPT TYPE="text/JavaScript">loadProgress1();</script>
<SCRIPT TYPE="text/JavaScript"
   SRC="../client_lib/JObjectManager.js"></SCRIPT>
<SCRIPT TYPE="text/JavaScript">loadProgress1();</script>
<SCRIPT TYPE="text/JavaScript"
   SRC="../client_lib/JEventManager.js"></SCRIPT>
<SCRIPT TYPE="text/JavaScript">loadProgress1();</script>
<SCRIPT TYPE="text/JavaScript"
   SRC="../client_lib/JDragManager.js"></SCRIPT>
<SCRIPT TYPE="text/JavaScript">loadProgress1();</script>
<SCRIPT TYPE="text/JavaScript"
   SRC="../client_lib/JPanel.js"></SCRIPT>
<SCRIPT TYPE="text/JavaScript">loadProgress1();</script>
<SCRIPT TYPE="text/JavaScript"
   SRC="../client_lib/NWindow.js"></SCRIPT>
<SCRIPT TYPE="text/JavaScript">loadProgress1();</script>
<SCRIPT TYPE="text/JavaScript"
   SRC="../client_lib/nServer.js"></SCRIPT>
<SCRIPT TYPE="text/JavaScript">loadProgress1();</script>
<SCRIPT TYPE="text/JavaScript"
   SRC="../client_lib/nwMenu.js"></SCRIPT>
<SCRIPT TYPE="text/JavaScript">loadProgress1();</script>
<SCRIPT TYPE="text/JavaScript"
   SRC="../client_lib/nwDialog.js"></SCRIPT>
<SCRIPT TYPE="text/JavaScript">loadProgress1();</script>
<SCRIPT TYPE="text/JavaScript"
   SRC="../client_lib/nwToolbar.js"></SCRIPT>
<SCRIPT TYPE="text/JavaScript">loadProgress1();</script>
<SCRIPT TYPE="text/JavaScript"
   SRC="../client_lib/nwFileDialog.js"></SCRIPT>
<SCRIPT TYPE="text/JavaScript">loadProgress1();</script>
<SCRIPT TYPE="text/JavaScript"
   SRC="../client_lib/nwMsgDialog.js"></SCRIPT>
<SCRIPT TYPE="text/JavaScript">loadProgress1();</script>
<SCRIPT TYPE="text/JavaScript"
   SRC="../client_lib/nwFixedTable.js"></SCRIPT>
<SCRIPT TYPE="text/JavaScript">loadProgress1();</script>
<SCRIPT TYPE="text/JavaScript"
   SRC="../client_lib/nwEditCtrl.js"></SCRIPT>
<SCRIPT TYPE="text/JavaScript">loadProgress1();</script>
<SCRIPT TYPE="text/JavaScript"
   SRC="../client_lib/nwTabPanel.js"></SCRIPT>
<SCRIPT TYPE="text/JavaScript">loadProgress1();</script>
<SCRIPT TYPE="text/JavaScript" SRC="../ajaxword/nwWord.js"></SCRIPT>
<SCRIPT TYPE="text/JavaScript">loadProgress1();</script>
</head>
</body>
</html>

Initializing the Application User Interface and Asynchronous Communications
After all script files have been downloaded, AjaxWord initializes its user interface by loading the following HTML document (ajaxword.html). It, in turn, loads two additional HTML documents, nwWordIEMenubar.html and nwWordBg.html. The entire user interface is defined by these two HTML documents. The former defines the menu bar and toolbar. The latter defines the application's MDI environment. Listing 15.5 is the HTML document (ajaxword.html) responsible for initializing the application user interface:

Listing 15.5

<HTML>
<HEAD>
<TITLE>Welcome to AjaxWord</TITLE>
<SCRIPT TYPE="text/JavaScript" SRC="../client_lib/is.js"></SCRIPT>
<SCRIPT TYPE="text/JavaScript">
   _nxLoadActiveX("../client_lib","JEvent", "JObjectManager",
   "JEventManager","JPanel","JDragManager","NRequestManager","nwDialog");
</SCRIPT>
<SCRIPT TYPE="text/JavaScript">
var topPanel; var contentPanel; //var dialogPanel;
function initDoc() {
   pageWidth = (is.ns4)? window.innerWidth: document.body.offsetWidth;
   pageHeight = (is.ns4)? window.innerHeight : document.body.offsetHeight;
   topPanel=new JPanel(null,0,0,pageWidth,66,null,null,null,true,true,window);
   contentPanel=new JPanel(null,0,66,pageWidth,pageHeight-66,null,null,null,true,true,win
dow);
   topPanel.paint();
   contentPanel.paint();      //alert(topPanel.html);
     topPanel.load("nwWordIEMenubar.html");
     contentPanel.load("nwWordBg.html");
   }

</SCRIPT>
</HEAD>
<body
   style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; BORDER-RIGHT: 0px; BORDER-TOP: 0px; MARGIN:
0px"
   scroll=no onload="initDoc();">
<iframe id="nServer1" name="nServer1" height=0 width=0></iframe>
<iframe id="nServer2" name="nServer2" height=0 width=0></iframe>
<iframe id="nServer3" name="nServer3" height=0 width=0></iframe>
<iframe id="nServer4" name="nServer4" height=0 width=0></iframe>

<form id="nServerPost1" name="nServerPost1" method="post"
   ENCTYPE="multipart/form-data">
   <input type="hidden" name="user">
   <input type="hidden" name="nwRequestID">
   <input type="hidden" name="sessionID">
   <input type="hidden" name=postData>
   <input type="hidden" name="postName">
   <input type="hidden" name="name2">
   <input type="hidden" name="data2">
</form>

<form id="nServerPost2" name="nServerPost2" method="post"
   ENCTYPE="multipart/form-data">
   <input type="hidden" name="user">
   <input type="hidden" name="nwRequestID">
   <input type="hidden" name="sessionID">
   <input type="hidden" name=""postName"">
   <input type="hidden" name="postData">
   <input type="hidden" name="name2">
   <input type="hidden" name="data2">
</form>

<SCRIPT TYPE="text/JavaScript"
   SRC="../client_lib/nServer.js"></SCRIPT>
</body>
</HTML>

After ajaxword.html finishes loading, the "onLoad" event will cause the "initDoc" method defined in this HTML document to be executed, which in turn loads nwWordIEMenubar.html and nwWordBg.html into separate container panels.

As you might have noticed from Listing 15.5, ajaxword.html also defines a few hidden "Iframe" objects. These Iframe objects are used for asynchronously communicating with the server. XML HttpRequest is not the only way to do asynchronous communication in the AJAX model. In some cases, it's actually more convenient to use the hidden "Iframe" instead. When AjaxWord was written, "Iframe" was the only option.

Further, ajaxword.html contains a few "form" elements that all fields are hidden fields. These forms are actually used to do asynchronous communications as well. When the AjaxWord client needs to send a message to the server in the background, the message is actually inserted into a hidden form field and posted to the server side as a "multipart/form-data" URL request.

Connecting the UI to Application Logic
After the nwWordIEMenubar.html file is loaded, nwWord.js is loaded in the background (actually it was already loaded by the initial loading progress screen and then cached by the browser) and the "initWord" method is called at the "onLoad" event:

<body scroll="no" class="toolbarBody"
     onselectstart="event.cancelBubble=true;return false;"
     onload="initWord()">

The "initWord()" method defined in "nwWord.js" initializes the AjaxWord client logic. It instantiates the menu bar and toolbar JavaScript controllers and associates them with the actual view objects. It also instantiates a "nwWordGUIActionListener" that listens to the menu bar and toolbar events. This is done by calling the global event manager and registering this listener object with "MenuClick," "BUTTONCLICK," "FOCUS," and "BLUR" events. "initWord" also registers the "onWordExit" method to handle the browser window close event – a subject that will be explained later in this chapter.

Listing 15.6

function initWord()
{

     pageWidth = (is.ns4)? window.innerWidth: document.body.offsetWidth;
     pageHeight = (is.ns4)? window.innerHeight : document.body.scrollHeight;
     if(parent.handleResize) parent.handleResize(pageHeight);
     menubar=new nwToolbar('menubar');
     toolbar=new nwToolbar('shortcuts');

     menuListener =new nwWordGUIActionListener();
     flistener=new focusListener();
     eventManager.addEventListener("MenuClick",menuListener);
     eventManager.addEventListener("BUTTONCLICK",menuListener);
     eventManager.addEventListener("FOCUS",flistener);
     eventManager.addEventListener("BLUR",flistener);
     toolbar.setEnable('save',false);

     if(!dialogPanel)
     {
       dialogPanel=new nwDialog("A Dialog Window",200,100,400,200,true,parent);
       dialogPanel.paint();
     }

     window.onbeforeunload=_onWordExit;
     formatSelect=document.all['formatSelect'];
     fontSelect=document.all['fontSelect'];
     sizeSelect=document.all['sizeSelect'];
}

Event Processing
"nwWordGUIActionListener.js" defines the event-handling code for this application. After it's instantiated and registered as the event handler for all menu bar and toolbar events, the event manager will route these events to this object.

This object contains two methods: onMenuClick and onButtonClick. These two methods are actually implemented by the same JavaScript function called "menuClicked." For each event, this JavaScript function will examine the "command" parameter and the source object, and route the event to the appropriate destination for processing:

Listing 15.7

function nwWordGUIActionListener()
{
   this.id="I listen to Word Menu";
   this.onMenuClick=menuClicked;
   this.onButtonClick=menuClicked;
}
function menuClicked(je)
{
   if(!je) return;
   var cmd=je.getCommand();
   var srcObj=je.getSource();
   if(cmd) cmd=cmd.toLowerCase();
   if(srcObj)
  {
     if(srcObj.id && srcObj.id=="fgColorPick")
     {
       doFormat("ForeColor",false,cmd);
       return;
     }
     else if(srcObj.id=="bgColorPick")
     {
       doFormat("BackColor",false,cmd);
       return;
     }
     else if(srcObj.id=="bgcolor")
     {
       doFormat("BgColor",false,cmd);
       return;
     }
   }
   if(cmd=="new")
   {
     openFile();
   }
   else if (cmd=="open")
   {
     var jp=showFileDialog("Open");
     jp.setFileDialog(nwFileDialog.OPEN);
     jp.fileDialogCallBack=openFile;
   }
   else if(cmd=="close")
   {
     var cw=getFocusedWindow();
     if(cw && cw.nwEditCtrl)
     {
       cw.onClose();
     }
     return;
   }
   else if(cmd=="saveas")
   {
     var cw=getFocusedWindow();
     if(cw)
     {
       cw.filename=null;
       saveFile();
     }
   }
   else if(cmd=="save")
   {
     saveFile();
   }
   else if(cmd=="pagesetup")
   {
   }
   else if(cmd=="printpreview")
   {
     showPreview();
   }
   else if(cmd=="print")
   {
     showPreview();
   }
   else if(cmd=="exit")
   {
     if(_onWordExit())
     {
       if(window.parent) window.parent.close();
       else window.close();
     }
   }
   else if(cmd=="cut")
   {
     doFormat('Cut');
     return;
   }
   else if(cmd=="copy")
   {
     doFormat('Copy');
     return;
   }
   else if(cmd=="paste")
   {
     doFormat('Paste');
     return;
   }
   else if(cmd=="selectall")
   {
     doFormat('SelectAll');
     return;
   }
   else if(cmd=="clear")
   {
     doFormat('Unselect');
     return;
   }
   else if(cmd=="find")
   {
     doDialogAction("./nwFindReplace.html","Find and Replace",550,250);
     return;
   }
   else if(cmd=="replace")
   {
     doDialogAction("./nwFindReplace.html","Find and Replace",550,250);
     return;
   }
   else if(cmd=="normalview")
   {
     var cw=getFocusedWindow();
     if(cw && cw.nwEditCtrl)
   {
     cw.nwEditCtrl.init(true);
     cw.setFocus(true);
   }
   return;
}
else if(cmd=="browseview")
{
   var cw=getFocusedWindow();
   if(cw && cw.nwEditCtrl)
   {
     cw.nwEditCtrl.init(false);
     cw.setFocus(true);
   }
   return;
   }
   else if(cmd=="preview")
   {
     showPreview();
     return;
   }
   else if(cmd=="pageview")
   {
   }
   else if(cmd=="bgimage")
   {
   }
   else if(cmd=="insertimage")
   {
     doInsert('InsertImage',true);
     return;
   }
   else if(cmd=="uploadtimage")
   {
     doDialogAction("nwUploadImage.html","Upload and Insert Image",420,160);
     return;
   }
   else if(cmd=="link")
   {
     doDialogAction(„../ajaxword/nwInputLink.html","Insert HyperLink",420,160);
     return;
   }
   else if(cmd=="button")
   {
     doInsert('InsertButton',true);
   }
   else if(cmd=="inputbutton")
   {
     doInsert('InsertInputButton',true);
   }
   else if(cmd=="hr")
   {
     doInsert('InsertHorizontalRule',true);
   }
   else if(cmd=="select")
   {
     doInsert('InsertSelectDropdown',true);
   }
   else if(cmd=="password")
   {
     doInsert('InsertInputPassword',true);
   }
   else if(cmd=="listbox")
   {
     doInsert('InsertSelectListbox',true);
   }
   else if(cmd=="textarea")
   {
     doInsert('InsertTextArea',true);
   }
   else if(cmd=="checkbox")
   {
     doInsert('InsertInputCheckbox',true);
   }
   else if(cmd=="radiobtn")
   {
     doInsert('InsertInputRadio',true);
   }
   else if(cmd=="textbox")
   {
     doInsert('InsertInputText',true);
   }
   else if(cmd=="submit")
   {
     doInsert('InsertInputSubmit',true);
   }
   else if(cmd=="reset")
   {
     doInsert('InsertInputReset',true);
   }
   else if(cmd=="inserttable")
   {
     _nwDoInsertTable();
     return;
   }
   else if(cmd=="selectcell")
   {
   }
   else if(cmd=="selectrow")
   {
   }
   else if(cmd=="selectcol")
   {
   }
   else if(cmd=="selecttable")
   {
   }
   else if(cmd=="insertcel")
   {
     _nwTableInsertCel();
     return;
   }
   else if(cmd=="insertrow")
   {
     _nwTableInsertRow();
     return;
   }
   else if(cmd=="insertcol")
   {
     _nwTableInsertCol();
     return;
   }
   else if(cmd=="deleterow")
   {
     _nwTableDeleteRow();
     return;
   }
   else if(cmd=="deletecol")
   {
     _nwTableDeleteCol();
     return;
   }
   else if(cmd=="deletecel")
   {
     _nwTableDeleteCel();
    return;
   }
   else if(cmd=="minimizeall")
   {
     for(var i=0;i<winArray.length;i++)
     {
       var wi=winArray[i];
       if(wi.isVisible()) wi.iconize();
     }
   }
   else if(cmd=="arrangewindow")
   {
     var bx=20;
     var by=20;
     var wx=bx;
     wy=by;
     var pw=500;
     ph=500;
     for(var i=0;i<winArray.length;i++)
     {
       var wi=winArray[i];
       if(i==0)
       {
         pw = wi.winLevel.document.body.offsetWidth-4;
         ph = wi.winLevel.document.body.offsetHeight-4;
       }
       if(wi.isVisible())
       {
         wi.resize(500,300);
         objectManager.bringToFront(wi);
         wi.setLocation(wx,wy);
         wx+=50;
         wy+=50;
         if(wx>pw-200)
         {
           bx+=70;
           wx=bx;
         }
         if(wy>ph-200)
         {
           by=50;
           wy=by;
         }
         if(bx>pw-200) bx=20;
       }
     }
   }
   else if(cmd=="closeall")
   {
     for(var i=0;i<winArray.length;i++)
     {
       var wi=winArray[i];
       if(wi.isVisible())
       {
         if(wi.onClose) wi.onClose();
         else wi.setVisible(false);
       }
     }
   }
   else if(cmd=="help")
   {
   }
   else if(cmd=="about")
   {
   showMsgDlg("<CENTER><H1>Ajax<i>W</i>ord</H1>Version: alpha<BR>Written and modified
   between 1996 and 2000. <BR><BR>Copyright(c)1996-2005 Coach Wei <a href='http://www.
   coachwei.com/' target=_blank>blog</a>. Open Source licensed.",
   "About AjaxWord", nwMsgDialog.OK,"../images/settings.gif");

   }
   else
   {
   }
}

Handling the Application's Exit
Unlike classic Web application developers, AJAX application developers have to pay special attention to the client-side "exit" event (say the user clicks the "close" button in the browser window). The reason is that AJAX applications typically hold state information on the client side. If the browser window is closed without proper handling, the client-side state will be lost and cause problems for the application.

AjaxWord is a good example. When the user is editing a document, if he somehow clicks the "close" button on the browser window by mistake, the browser window will be closed and his document lost.

A general way to handle this situation is to register an event handler for the "onbeforeunload" event of the "window" object. The event handler can do processing before the browser window is closed.

Listing 15.8 is the "onbeforeunload" event handler for AjaxWord. It loops though all the currently opened editing windows (stored in the "winArray" variable). For each visible editing window, it tries to save the content (the logic defined in the "onClose()" method for the "window" object). In the end, the event handler asks the user whether he or she really wants to exit from AjaxWord. If the user chooses "cancel" from the dialog, the event will be cancelled. If the user chooses "ok" from the confirmation dialog, the browser window will be closed and the application terminated on the client side.

The event handler code is:

Listing 15.8

function _onWordExit()
{
   for(var i=0;i<winArray.length;i++)
   {
     var wi=winArray[i];
     if(wi.isVisible())
     {
       if(wi.onClose()==false)
       {
         if(event)
         {
           event.returnValue="Exit from AjaxWord?";
           event.cancelBubble=true;
         }
         return false;
       }
     }
   }
   if(event) event.returnValue="Exit from AjaxWord?";
   return true;
}

AjaxWord Server Logic
AjaxWord server code is actually fairly simple, straightforward Java code. It does user registration, verification, and loads and saves files. Such tasks are trivial to Java developers and so we're not going to elaborate on them.

Summary
AjaxWord is a Web-based word processor that aims to mimic Microsoft Word. It closely resembles the look-and-feel of Microsoft Word with a rich graphical user interface, partial screen update, and asynchronous server communications. Its Web-based nature lets users securely store user documents on the server and so gives users the flexibility to use the application from anywhere.

Writing complex applications like AjaxWord requires careful design – otherwise there will be significant development and maintenance challenges. AjaxWord uses a central controller to manage and dispatch requests on the server side. On the client side, it separates all rich UI widget-related code into a generic AJAX toolkit and uses an "event dispatching" mechanism to process client events.

AJAX applications tend to keep state information on the client side. This requires developers to pay attention to state consistency. For example, it's recommended that they write code to handle application state when the user closes the browser window.

AjaxWord is open source. It's available as a free service at http://www.ajaxword.com. Developers can also download the entire code from this Web site.

This content is reprinted from Real-World AJAX: Secrets of the Masters published by SYS-CON Books. To order the entire book now along with companion DVDs, click here to order.

More Stories By Coach Wei

Coach Wei is founder and CEO of Yottaa, a web performance optimization company. He is also founder and Chairman of Nexaweb, an enterprise application modernization software company. Coding, running, magic, robot, big data, speed...are among his favorite list of things (not necessarily in that order. His coding capability is really at PowerPoint level right now). Caffeine, doing something entrepreneurial and getting out of sleeping are three reasons that he gets up in the morning and gets really excited.

Comments (1) View Comments

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


Most Recent Comments
praveen3232 05/22/09 03:05:00 AM EDT

hi Coach Wei and all,

how to get ajaxword source code.www.ajaxword.com redirect to online chess.if you have source code pls email me. my email ID praveen3232@gmail.com
advance thanks