Wednesday September 8, 2010
One problem with using GET requests with Ajax is that such requests were designed to retrieve static information. This means that some browsers will cache the response from the first request and return that again for the next call. Not a very good way of retrieving a dynamically changing value from the server. There are two ways to fix this problem as this fourteenth Ajax tutorial demonstrates.
Caching of Requests
Tuesday September 7, 2010
Testing a simple JavaScript is relatively easy but when you start to get really complex JavaScripts then having a test suite available to test the script with that allows the same test to be repeated lots of times becomes essential. You don't need to create your own test suite though because there are plenty of them around that are available for anyone to use.
JavaScript Testing Tools
Monday September 6, 2010
Another object in my modular JavaScript class library. The $A object provides a basis for adding Ajax functionality into a web page. Simply pass between two or four parameters when you create the object to define what to pass to the server and what function to pass the returned values into.
Dollar A
You are also welcome to amend or add to this object for your own use provided that you
post a copy of your amended code for everyone to share.
Sunday September 5, 2010
JavaScript functions can do different things each time they are called. JavaScript functions both allow you to specify parameters that allow different values to be passed into a function as well as being able to return a value from the function to the calling processing. In this ninth "Modern JavaScript Tutorial" we look at how you can make your JavaScript functions more flexible.
Passing Parameters and Returning Values