function appendRow() { global $objResponse; global $aRequests; $row = time(); $row = "row_" . $row; $objResponse->plugin('clsTableUpdater', 'appendRow', $row, 'theTable'); $objAnchor = new clsAnchor(array('event' => array('onclick', &$aRequests['setrownumber'], array(array(0, XAJAX_QUOTED_VALUE, $row))), 'child' => new clsLiteral($row))); $objResponse->plugin('clsTableUpdater', 'assignRow', array($objAnchor->getHTML()), $row); return $objResponse; }
$shortDelay_Async->addChild(new clsLiteral("Short Delay (Async)")); $shortDelay_Async->setEvent('onclick', $aRequests['shortdelay'], array(array(0, XAJAX_JS_VALUE, '{a:1, b:2, c:"&amp;nbsp;two>", "0":1, "ä":"ä"}'))); $mediumDelay_Async = new clsAnchor(); $mediumDelay_Async->setAttribute('href', '#log'); $mediumDelay_Async->addChild(new clsLiteral("Medium Delay (Async)")); $mediumDelay_Async->setEvent('onclick', $aRequests['mediumdelay'], array(array(0, XAJAX_JS_VALUE, '[1,2,3,3]'))); $longDelay_Async = new clsAnchor(); $longDelay_Async->addChild(new clsLiteral("Long Delay (Async)")); $longDelay_Async->setEvent('onclick', $aRequests['longdelay']); $shortDelay_Sync = new clsAnchor(); $shortDelay_Sync->addChild(new clsLiteral("Short Delay (Sync)")); $shortDelay_Sync->setEvent('onclick', $aRequests['shortdelays'], array(), 'var oRet = ', '; xajax.$("log").innerHTML += "Function returned: " + oRet + "<br />"; return false;'); $mediumDelay_Sync = new clsAnchor(); $mediumDelay_Sync->addChild(new clsLiteral("Medium Delay (Sync)")); $mediumDelay_Sync->setEvent('onclick', $aRequests['mediumdelays'], array(), 'var oRet = ', '; xajax.$("log").innerHTML += "Function returned: " + oRet + "<br />"; return false;'); $longDelay_Sync = new clsAnchor(); $longDelay_Sync->addChild(new clsLiteral("Long Delay (Sync)")); $longDelay_Sync->setEvent('onclick', $aRequests['longdelays'], array(), 'var oRet = ', '; xajax.$("log").innerHTML += "Function returned: " + oRet + "<br />"; return false;'); echo '<' . '?' . 'xml encoding=' . $xajax->getConfiguration('characterEncoding') . ' ?' . '>'; ob_start(); ?> <script type='text/javascript' defer charset='UTF-8'> /* <![CDATA[ */ clearCheckboxes = function() { var checkboxes = document.getElementsByTagName('INPUT'); var cLen = checkboxes.length; for (var c = 0; c < cLen; ++c) if ('checkbox' == checkboxes[c].type) checkboxes[c].checked = ''; }
$divColor->addChild($aSASB_Blue); $divColor->addChild($litNonBreakSpace); $aSASB_White = new clsAnchor(); $aSASB_White->setEvent('onclick', $aRequests['sendassignstylebackground'], array(array(0, XAJAX_QUOTED_VALUE, '#ffffff'))); $aSASB_White->addChild(new clsLiteral('White')); $divColor->addChild($aSASB_White); $divColor->addChild($litNonBreakSpace); $divStyle->addChild($divColor); $divPage->addChild($divStyle); $divOuterHTML = new clsDiv(); $aSAOH = new clsAnchor(); $aSAOH->setEvent('onclick', $aRequests['sendassignouterhtml']); $aSAOH->addChild(new clsLiteral('Test an update using the outerHTML property.')); $divOuterHTML->addChild($aSAOH); $divPage->addChild($divOuterHTML); $divInnerHTML = new clsDiv(); $aSPIH = new clsAnchor(); $aSPIH->setEvent('onclick', $aRequests['sendappendinnerhtml']); $aSPIH->addChild(new clsLiteral('Test an append using the innerHTML property.')); $divInnerHTML->addChild($aSPIH); $divPage->addChild($divInnerHTML); $divContent = new clsDiv(array('attributes' => array('id' => 'content'), 'children' => array(new clsLiteral('This content has not been modified, click an option above to execute a test.')))); $divPage->addChild($divContent); $objTestScriptPlugin->printHeader($xajax, "xajax Test Suite - Assign / Append", ob_get_clean()); ob_start(); $divPage->printHTML(); $objTestScriptPlugin->printControlPanel(ob_get_clean()); $objTestScriptPlugin->printStatusPanel(); $objTestScriptPlugin->printLogPanel(); $objTestScriptPlugin->printDescriptionPanel(''); $objTestScriptPlugin->printFooter();