\n"; //foreach ($_COOKIE as $key => $value) { echo "

$key: {$_COOKIE[$key]}

\n"; } echo "\n"; $nodesPerPage = getPref('nodesPerPage'); echo "\n"; echo "\n"; $displayCmds = getPref('displayCmds'); $displayStr = $displayCmds ? 'checked' : ''; echo "\n"; echo "\n"; //echo "\n"; echo "
\n"; insertButtons(array('label' => 'Set Preferences', 'onclick' => 'doSetPref()')); echo "
Number of nodes to display per page:
Display commands run by this interface:
\n"; echo << //window.onload = function(){window.document.prefs.setPrefButton.focus()}; function doSetPref(){ var form = window.document.prefs; var cookies = getCookies(); //for (c in cookies) { alert('cookies['+c+']='+cookies[c]); } //alert('cookies[nodesPerPage]='+cookies['nodesPerPage']); var nodesPerPage = form.nodesPerPage.value; if (nodesPerPage != cookies['nodesPerPage']) { setCookie('nodesPerPage',nodesPerPage,'/'); } var displayCmds = form.displayCmds.checked ? '1' : '0'; if (displayCmds != cookies['displayCmds']) { setCookie('displayCmds',displayCmds,'/'); } document.getElementById('setMsg').style.display = 'inline'; //return false; } EOS; ?>