|
|
Javascript SerializerDescriptionThe purpose of this script is to transform PHP variables into Javascript variables so that an HTML page can call a PHP script without having to be reloaded on each call. HistoryThere are many manners of reaching a webservice from Javascript. But the only one I know which is compatible with almost all the navigators is the one used here which consists in calling a PHP script that returns Javascript variables that are directly evaluated by the HTML page. This script had many success since the first time I put it on line in 2002 and many people were inspired by to create applications (PHP or others) able to send serialized data to Javascript. The most known being JPSpan published on SourceForge under open-source GPL licence that is in respect with the GPL licence used in my own script. I want to thank all of you who sends me positive words about this script and also thank originals programmers of AMFPHP which I took as a starting point to write this one. Downloading the serializer script and installing a gateway
Hello World !Download the «Hello World !» example To use the downloaded files, you just will have to deploy them as they are on your server as the example contains the main script. The application will work by calling the hello_world_example.html page contained in the archive. Calculator exampleThis calculator ask the server to calculate the total of the operation. Nothing is calculated by Javascript and the communication with the server is made without to have to refresh the HTML page when the Calculate button is pressed. Download the calculator example To use the downloaded files, you just will have to deploy them as they are on your server as the example contains the main script. The application will work by calling the calculator_example.html page contained in the archive. Real life useAn application used to illustrate monetary conversion webservice access is on the page devoted to the Javascript version of EuroConverter. This application contains the gateway file, js_serializer.php and the Javascript client, but not the webservice in itself which could not be easily distributed. |
||||||||||||||||||
| rss rss english xhtml 1.1 css 2.0 wdg | |||||||||||||||||||