simpli Posted April 2, 2009 Share Posted April 2, 2009 Hi, I haven't started ajax yet but I have been reading books while in the meantime dusting off my js and php. I have a question which pertains with what I'm going to try to achieve later. Ajax is good to retrieve stuff from the server while providing desktop like response. But what if what I want to do is on the server side? For instance when i click a button on the client side, i want a row to be added to a table on the server side? How can I do that? There is nothing in the js that allows me to start such a thing from the client side. Or is it through the php file I call with the XHR that I can get whatever done on the server side? If so, if the row is added, the XHR will not really be returning anything so what signal do I have that the table was indeed added to the table? Thanks for clarifying J-R Quote Link to comment Share on other sites More sharing options...
dpacmittal Posted April 2, 2009 Share Posted April 2, 2009 Hi, I haven't started ajax yet but I have been reading books while in the meantime dusting off my js and php. I have a question which pertains with what I'm going to try to achieve later. Ajax is good to retrieve stuff from the server while providing desktop like response. But what if what I want to do is on the server side? For instance when i click a button on the client side, i want a row to be added to a table on the server side? How can I do that? There is nothing in the js that allows me to start such a thing from the client side. Or is it through the php file I call with the XHR that I can get whatever done on the server side? Yeah buddy, you are right. We call the PHP file through XHR which gets the job done. If so, if the row is added, the XHR will not really be returning anything so what signal do I have that the table was indeed added to the table? You could indeed echo "Success"; in the php file if the table row gets added. Then you can display the result from the PHP file which is "Success" in the HTML document. Hope you got my point. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.