Yes, you can send more than one variables to your PHP script residing on the server. Just append the start and end points as request parameters to the query string which you would be using to make an Ajax request. Something like /php/process.php/?start=0&end=10
. Also make sure you encode the URL before making an Ajax request for proper encoding of special characters (like space for instance). And in process.php, you can retrieve the variables from the request object. In J2EE, it would be something like request.getParameter("start")
.
Assuming this isn't your first stint with Ajax, you can easily process the response using either the responseText
or responseXML
attribute of XMLHttpRequest
object.