content |
Problem: 'file.html' is a normal html file with external 'file.js' and 'file.css' files in the head section (the normal situation). If we try to load this file via XMLHttpRequest into some div, we obtain the behavior:
|
Solution: Load 'file.html' via AJAX and 'file.js' / 'file.css' files with include_once(...) Testing: Click below and a '100% width green button' apear in the div content ('file.css' loaded), and clicking it alerts 'Hello world' ('file.js' loaded). Refresh the page to test again.
|
Changing css without reload the page: (Stoyan's idea) Load css files with include_dom(...)
|