I am developing a JQuery mobile web app and I am having some problems with the format after executing
$(‘#someId’).replaceWith(php var);
The problem, I think, is that as this is executed before the JQuery Mobile libraries are loaded I get a crappy format when I replace.
Can anyone think on something that could help?
Thank you very much!
UPDATE:
I’m quite new to PHP. What I want to do is to have several variables with the div html code in a way that when I click any button I don’t have to refresh the page, just to refresh the div. This data is comming from an external database, so I need to do it with php… any ideas??
Simply said, all your browser-code is build by a server-side script and is interpreted right after the server-side script has finished. To do what you want to do, you need to utilize some ajax-actions…