Monday, 4 March 2013

Ajax - A new link to the chain

After we had managed to get the server to run our php code, we looked into how we are going to get the respected buttons to run there assigned php code this seemed like a straight forward procedure but after many attempts we were not able to produce the outcome that we wanted. the method we were using was to create a on-click event in our html page using jquery, this was supposed to trigger a function which contained its php code when the mouse clicked. This however is not possible since php is a server side function and cannot be ran directly from the client side html page. This meant that however we tried to manipulate the php code on the client side to preform the task it would simple just run the code in the html on the server side. 

A solution around this was to create several html page all linked to one another that would run the respected php code on the client side. This solution worked but came with the sacrifice of speed as the page would have to constantly reload and the browser would sometimes not responded to the link. this is he goal we wished to achieve but there must of been a much smpler more responsive way. This led us to the programming language called ajax a new link in our ever growing chain to find a solution.

The ajax language is another form of the java script, just like jquery but this is intended too send small requests to the server from a webpage without the need to reload/ refresh the page itself. This gave us the a solution to our problem we can use this functions to call the selected php code when requested, keeping the response time high and without the need of several pages. this is what we will be working on in these final days to have our project working the way we intend it too, preparing ourselves for the bench inspection this week.

No comments:

Post a Comment