[TYPO3-ect] Future of different AJAX-libs?
Joerg Schoppet
joerg at schoppet.de
Tue Sep 12 18:08:50 CEST 2006
R. van Twisk wrote:
> For me I don't understand xajax right now... I just know it does
> something 'automagicly', yet xajax cannot help me create and modify
> a DOM tree? right?
If I understand you right with "DOM tree", do you mean something like
e.g. a ul-list:
<ul>
<li>pos 1</li>
<li>pos 2</li>
</ul>
this is possible:
assuming you have the following html displayed:
<html>
<head>
<title>test</title>
</head>
<body>
<h1>Test-page</h1>
<div id="content">
</div>
</body>
</html>
In an ext you can do the following:
<code>
$arr = array('pos 1', 'pos 2');
$objResponse = new tx_xajax_response();
$objResponse->addCreate('content', 'ul', 'list');
foreach ($arr as $iKey => $sValue) {
$objResponse->addCreate('list, 'li', 'list_' . $iKey);
$objResponse->addAppend('list_' . $iKey, 'innerHTML', $sValue);
}
$objResponse->getXML();
</code>
If this was not what you mean, just ignore this post.
Joerg
More information about the TYPO3-team-extension-coordination
mailing list