If a good prototype of PHP / HTML / JS worked on my personal Linode, he tried to drop it into a working machine.
The page adds the script tag dynamically using some JavaScript. This is a bunch of Google charts that are updated based on different time series. This code looks something like this:
$.post("channel_functions.php", data_to_post, function(data){
var script = document.createElement('script');
var head= document.getElementsByTagName('head')[0];
var script= document.createElement('script');
var text = document.createTextNode(data);
script.type= 'text/javascript';
script.id = 'chart_data';
script.appendChild(text);
head.appendChild(script);
loadTheCharts();
});
function loadTheCharts() {
function1();
function2();
}
Function1 () and function2 () do not exist until they are added to dom, but I do not call loadTheCharts () until $ .post is run, so this does not seem to be a problem.
PHP-, , JavaScript , O'Reilly. dev, , .
, , , 8080, 192.168.blah.blah: 8080/index.php nicedomain.com/index.php.
, dom, - " ", Firebug , "function2() - undefined", , script .
: , , : 8080, , , , function2(), Linode Apache 8080?