Reputation: 614
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??
Upvotes: 0
Views: 119
Reputation: 1336
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...
Upvotes: 2
Reputation: 8417
You will never be able to load a client side library (jQuery mobile) before the server side code (PHP) has been executed. Give us some code on what you want to do and I am sure we can help you better.
Upvotes: 2