JavaScript JavaScript Remote Scripting

JSRS is short for Javascript Remote Scripting. Nowadays this technique is known as ajax, short for Asynchronous JavaScript and XML, but other than the name it's nothing new.

This project has been maintained on sourceforge before (http://sourceforge.net/projects/js-rs/). It is now incorporated into the framework and ships with the download package.

No Reload ...

When traditional web applications interact with the user, you often reach the point where data has to be fetched or exchanged with the server. This usually leads to a large overhead in transferring the data plus the state-info in hidden form fields and developing step by step wizards that cause frequent page reloads.
For example, when filling out a form on a Web page, the user must often reload the entire page several times in order for the application to validate the entries.

Immediate Interaction ...

Remote scripting enables a much more client/server-type interaction between the browser and the web server. E.g. the Web application can now validate data while the user is still filling out the rest of the form, without having to reload the page.
With remote scripting, developers can now create seamless, interactive Web applications in which the browser can call scripts "behind the scene".

JavaScript AJAX Workflow

No Java Nor Plugin ...

Some solve this problem by embedding a Java applet in the page to communicate with the server, but it requires Java or other plugins. This package works without the use of Java nor plugins and supports NS6.2, IE5.5 and up (don't know about Opera).


The Main Features ...

  • Data is exchanged without reloading the page.
  • Transparent parameter passing using WDDX (or a squeezed form of it, to reduce the size). WDDX makes it possible to transfer any js-types. Even complex structures like n-dimensional arrays and even objects (with restriction). We first intended to use XML-RPC but it seamed to be an overkill and PHP 4.1 didn't support it by default at the time.
  • Calls to object-methods are supported. E.g. you can call a remote method 'Class.method' and your callback may be of the form 'myObject.method'.
  • Can use GET and POST. Can use hidden iframes (for POST) or dynamically placed <script src=""> tags (for GET). We use that instead of XmlHttpRequest because it has wider browser support.

Todo / Wishlist

  • Code XmlHttpRequest support as optional communication technology.
  • Code JSON support as optional data exchange format (instead of XML).



Many people helped directly or indirectly by implementing parts and peaces. My thanks go to:


  • See the download page.
  • This component ships with the "BlueShoes Framework" and the "BlueShoes JavaScript" package (javascript/core/util/Bs_TitleToTooltip.lib.js).