Note that http:// www.tonymarston.net/php-mysql/radicore-and-javascript.html#f oot.element has been implemented only for the 'file' option, as shown in include.xml.php5.inc, function setJavaScript: if (isset($javascript['foot'])) {
$file_array = array();
foreach ($javascript['foot'] as $entry) {
if (key($entry) == 'file') {
if (in_array($entry, $file_array)) {
// already processed, so don't repeat
} else {
$file_array[] = $entry;
// add a reference to a file
$foot = $doc->createElement('foot');
$foot->setAttribute('type', 'file');
$foot = $js->appendChild($foot);
$url = $GLOBALS['url_files'] .dirname($PHP_SELF) .'/' .$entry[key($entry)];
$foot = $js->appendChild($foot);
$value = $doc->createTextNode($url);
$value = $foot->appendChild($value);
} // if
} // if
} // foreach
} // if
Add the 'code' option:
if (isset($javascript['foot'])) {
$file_array = array();
foreach ($javascript['foot'] as $entry) {
if (key($entry) == 'file') {
if (in_array($entry, $file_array)) {
// already processed, so don't repeat
} else {
$file_array[] = $entry;
// add a reference to a file
$foot = $doc->createElement('foot');
$foot->setAttribute('type', 'file');
$foot = $js->appendChild($foot);
$url = $GLOBALS['url_files'] .dirname($PHP_SELF) .'/' .$entry[key($entry)];
$foot = $js->appendChild($foot);
$value = $doc->createTextNode($url);
$value = $foot->appendChild($value);
} // if
} // if
if (key($entry) == 'code') {
// add a block of javascript code
$foot = $doc->createElement('foot');
$foot->setAttribute('type', 'code');
$foot = $js->appendChild($foot);
$value = $doc->createTextNode($entry[key($entry)]);
$value = $foot->appendChild($value);
} // if
} // foreach
} // if