Client/Server Gateway JSAPIThe Client/Server Gateway is a JavaScript API based upon my article "Client-to-Server Communication Using DHTML." This API automates most of the tasks for you and provides a very simplyyet powerfulmethod for passing JavaScript data objects between the browser and the server. I've included a number of examples to illustrate how to use and implement the API. While these examples may seem fairly basic, they provide a lot of functionality. I'll eventually add documentation, but for now, you'll have to pick apart the examples to see how to use the API. Examples
Simple HTML-Only
Main Demo
Zip Code Demo #1
Zip Code Demo #2
Area Code Demo
n-Related Select Demo Downloads
The main distrubition build:
The "zip code" database used in the examples: Revision HistoryBuild 203 (July 24, 2003) - Added the GatewayAPI.build property - Added the iframeSrc attribute. It seems that on HTTPS IE was throwing a message complaining about secure and unsecure items running on the page together. If you're running SSL/HTTPS on the site, just set this property to a blank html document. I'm including one with the build you can use. - Added the LGPL to the build. Some asked me about licensing for the code. Build 202a (March 14, 2003) - Released the code w/an unused function I used for debugging as well as I forgot to update the build number in the comments. No real changes. Build 202 (March 14, 2003) - Opera 5 does not properly cache the variables--it seems to make pointers to the iframe, so once a page is reloaded the references no longer exist. To work around this problem caching is turned off automatically for Opera 5. - Fixed bugs causing Opera 5 & 6 not to work. In order for Opera to reload a document into an iframe, the iframe tag needed a src attribute - Removed the script tag that was trying to load the wddx library. This wasn't used anyway and was the result of some legacy code. This was causes problems in NS4.7x. Build 201 (March 12, 2003) - Added caching routine. Caching is enabled by default. You can either turn caching off completely setting the obj.enableCache to false, or you can overwrite the cache settings per call to the server using the obj.sendPacket(value, useCache) argument. Build 200 (March 10, 2003) - Rewrote majority of API Build 104 (December 20, 2000) - Made the status bar updatable by changing the hard code delay to a var (this.statusdelay) - Changed delay of status bar updates from 10 to 100 Build 103 - Added catch for testing whether or not the WDDX library was actually loaded if it's not, we warn the user and disable the gateway. - Changed the name of the disable variable to disabled - Added onTimeout prototype for defining a function to run if the event times out Build 102 - First release |
||
Copyright © 2024, PengoWorks.com. All Rights Reserved. |