Hi,
I'm working on my first AJAX project and am not sure how much "work" i should be doing on the client (JavaScript) Vs the server (PHP).
Also, what are peoples thoughts on using the DOM to edit an AJAX page Vs putting HTML into a string and using .innerHMTL to drop content into place.
For example, at the moment i want to list all the content a user has access to... I send an AJAX request and the server returns just the data - no presentiation information or CSS. I then use Javascript on the client to build a table using the DOM and put this information on the screen and style it.
I'm just wondering is this the correct / normal way to do things as i will have a lot of Javascript by the time i am finished?
Any advice would be great.
Thanks,
damoth
I'm working on my first AJAX project and am not sure how much "work" i should be doing on the client (JavaScript) Vs the server (PHP).
Also, what are peoples thoughts on using the DOM to edit an AJAX page Vs putting HTML into a string and using .innerHMTL to drop content into place.
For example, at the moment i want to list all the content a user has access to... I send an AJAX request and the server returns just the data - no presentiation information or CSS. I then use Javascript on the client to build a table using the DOM and put this information on the screen and style it.
I'm just wondering is this the correct / normal way to do things as i will have a lot of Javascript by the time i am finished?
Any advice would be great.
Thanks,
damoth