Unified Software
t: +44 (0)191 305 5035  e: info@unifiedsoftware.co.uk 

Developers Cookbook

Free Trial

Register now for a free 30 day (or 300 hits) trial of BankVal.

Javascript - AJAX - JSON or XML

Call REST web services using Javascript and AJAX

BankVal REST web service calls can be easily made from your web pages by exploiting Javascript AJAX technology.

Use AJAX for your call to the BankVal web services to achieve a fast, efficient response, allowing you to fully exploit the speed of the BankVal servers.


FREE AJAX Code Sample from: support@unifiedsoftware.co.uk


Javascript – AJAX code solutions – how they work

AJAX, Asynchronous Javascript and XML, is a family of technologies.

The key part of AJAX technology that interests us is it's use of the XMLHttpRequest object. (XMLHttpRequest in Mozilla based browsers – in IE it's the XMLHttp object.)

With AJAX, your JavaScript can communicate directly with our servers, using the XMLHttpRequest object. By using this object, your JavaScript can issue a request directly to Unified Software's web services and then collect the returned results.

REST web services

Unified Software's REST web services are called by using a simple URL. By using an XMLHttpRequest object in your Javascript code you can send a URL request to the Unified Software's REST web services.

JSON or XML

Results are served up in either JSON or XML format.

The basic steps used in the Javascript solution are as follows:

1 Create the URL
2 Create the XMLHttp object and make the request
3 Create a callback
4 Catch the Results

Cross domain security

The only issue with this approach is that the XMLHttp object is constrained by the browser Same Origin Policy. This policy constrains some browsers to only connect with the server that the page was downloaded from. To overcome this restriction you can load a proxy script onto your server. Contact us at support and we can send you a Proxy written in php ready to upload onto your servers.

Request FREE Javascript AJAX code and Proxy application from:-

support@unifiedsoftware.co.uk

<< back to top >>

Our customers