Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

AJAXʵÏֵĶàÈËЭͬÉè¼Æ


Download board.zip - 39.6 KB - Old Version 
Download board_2008.zip - 55.03 KB  - Latest VS 2008 Version
Introduction  
This is an AJAX based WhiteBoard application. Typically unlike their desktop based counterparts, web applications need to be designed to use optimal server resources. This is one of the reasons for AJAX being popular. Here I demonstrate a powerful use of AJAX to make communication possible between two or more clients.
So, What can this do?
As I said, this is a WhiteBoard Application. Users are provided with certain drawing tools, color selections, etc. The basic idea is to share the user drawings among all the clients. All the users viewing the main page can participate in the drawing and share it with all other users. Clearing local canvas, server data, etc is also possible.
Background
A couple of years ago I was assigned the task of researching the capabilities of AJAX. Being a tech freak I was hell bent on convincing the client to use the then NEW AND HOT technology. I wasted a few days thinking on my right approach to the design and GUI. I wanted the application to look something like a desktop application and yet be executed in a browser. My aim was to avoid postbacks completely.(To impress the client). I was scampering through every result on google, reading every article on AJAX so as to get the perfect Application as a demo.
I happened to see a javascript (wz_jsgraphics.js) by Walter Zorn Link . It was then that the idea of building a web based WhiteBoard struck me. I give full credit to Walter for his excellent javascript. Once I learned using his script, it was just a matter of days before my own Web based Whiteboard was up and running.
The Basics...
As in all AJAX based applications, I have a main page that is displayed to the user. A page on the server handles all the requests and responses to this page. All the drawing part is done using Walters javascript. I designed a messaging mechanism to iden


Ïà¹ØÎĵµ£º

µÚ¶þ²½£º·ºÐÍͨÓö¯Ì¬²éѯ(LinQ+Ajax)

ÎҵĴºÇï³ÕÃεڶþ²½£º
дһ¸ö ͨÓÃµÄ ¶ÔÏó ÁÐ±í £¬»¹ °üº¬ ËÑË÷ºÍ ÊôÐÔ¹ýÂË¡£
¾ßÌåµÄЧ¹ûÊÇ£º
µ±Ð ҵÎñ Ìí¼ÓÒ»¸ö ±íµÄʱºò£¬Ö»ÐèÒªÔÚ ¶ÔÏóÄ£ÐÍÀïµÄ Ìí¼ÓÒ»¸ö model
ºǫ́¼¸ºõ²»Ðèд´úÂë¡£
(ÎÒÊǺǫ́£º¼¤¶¯ÈËÐÄ£¡)
µ÷ÓõĶÔÏ󣬵ڼ¸Ò³£¬ÊôÐ﵀ ¹ýÂË ºÍËÑË÷È«ÊÇ Ç°Ì¨µÄAjax²ÎÊý¿ØÖÆ
(ÎÒÊÇǰ̨£º#$!@#$%$^#$% ......

Ïê½âAJAXºËÐÄÖеÄXMLHttpRequest¶ÔÏó

 XMLHttpRequest ¶ÔÏóÊÇAJAX¹¦ÄܵĺËÐÄ£¬Òª¿ª·¢AJAX³ÌÐò±ØÐë´ÓÁ˽âXMLHttpRequest ¶ÔÏó¿ªÊ¼¡£
    Á˽âXMLHttpRequest ¶ÔÏó¾ÍÏÈ´Ó´´½¨XMLHttpRequest ¶ÔÏó¿ªÊ¼£¬ÔÚ²»Í¬µÄä¯ÀÀÆ÷Öд´½¨XMLHttpRequest ¶ÔÏóʹÓò»Í¬µÄ·½·¨£º
    ÏÈ¿´¿´IE´´½¨XMLHttpRequest ¶ÔÏóµÄ·½·¨£¨·½·¨1£©£º
va ......

ASP.NET,AJAXÎļþÉÏ´«µÄÒÉÎÊ¡£

ASP.NET,AJAXÎļþÉÏ´«µÄÒÉÎÊ
Ô­±¾ÒÔΪÓÃÕâÖÖ·½Ê½£¬°Ñ´Ë·½·¨·Åµ½Ò»¸öHttphandlerÖУ¬È»ºó´ÓJAVASCRIPT·ÃÎÊHttphandlerÀ´ÊµÏÖÎÞˢеÄÎļþÉÏ´«¡£Ã»Ïëµ½£¬ÕâÑùͬÑùÊDz»Ðеģ¬Ö»ÄÜÔÚ±¾»ú²âÊÔͨ¹ý£¬Èç¹û·Åµ½ÍøÉÏ£¬»òÕß´ÓÆäËûµØ·½·ÃÎʾͻáÌáʾÎÞ·¨ÕÒµ½Îļþ£¬¿É¼ûÔÚASP.NETÖÐËüÖ»ÄÜÓÃÓÚÉÏ´«·þÎñÆ÷¶ËµÄÎļþ¡£ 
֮ǰÔÚÍøÕ¾Ò²Ë ......

Ajax½éÉÜ XMLHttpRequest

Ajax½éÉÜ
AJAX - ä¯ÀÀÆ÷Ö§³Ö
AJAX µÄÒªµãÊÇ XMLHttpRequest ¶ÔÏó¡£²»Í¬µÄä¯ÀÀÆ÷´´½¨ XMLHttpRequest ¶ÔÏóµÄ·½·¨ÊÇÓвîÒìµÄ¡£IE ä¯ÀÀÆ÷ʹÓà ActiveXObject£¬¶øÆäËûµÄä¯ÀÀÆ÷ʹÓÃÃûΪ XMLHttpRequest µÄ JavaScript ÄÚ½¨¶ÔÏó¡£ÈçÐèÕë¶Ô²»Í¬µÄä¯ÀÀÆ÷À´´´½¨´Ë¶ÔÏó£¬ÎÒÃÇҪʹÓÃÒ»Ìõ "try and catch" Óï¾ä¡£
<script type="t ......

ajaxÌá½»±íµ¥

ajaxÌá½»±íµ¥
¹Ø¼ü×Ö: ajax
function ajaxSubmitForm(form, resultDivId) {          
var elements = form.elements;// Enumeration the form elements          
var element;      ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ