I am beginner of javascript and having a dummy question. I have a php program with some javascript included. The webpage will be prepared in the server side with php and the included javascript will be run on the client side to format some pattern text with css. My question is I want to save the html source (after client javascript effective) on the server side, but since the source will only be changed when it is loaded in the client’s browser so the source I save is always the raw one. Is that any way to ask the server to run the client-javascript first so as to save the resulting source?
Thanks for your help in advance.
Nah, but you can use AJAX to send the information being generated client-side that you want to save back to the server. Using JQuery this is as simple as:
For pure JS you can start with
XMLHttpRequest.