[TYPO3-ect] Future of different AJAX-libs?

R. van Twisk typo3 at rvt.dds.nl
Tue Sep 12 18:53:33 CEST 2006


Joerg Schoppet wrote:
> 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
>   
hey Joerg,

yes that is what I mean... it's quite cool you can create a 'DOM' tree 
in php.
I put it in between brackets because it's not really DOM you it creates but
rather a X(H)ML). I assume it send that over the wire?

What I currently see above is that it uses innerHTML to put the 'DOM' in 
in my HTML?
However innerHTML is in fact depreciated, but still widely used on browsers.
Should we still use innerHTML??

If you look at builder then you can 'really' create a DOM tree on a 
web-page the correct way.

Ries

-- 
Ries van Twisk
Freelance Typo3 Developer
=== Private:
email: ries at vantwisk.nl
web:   http://www.rvantwisk.nl/freelance-typo3.html
skype: callto://r.vantwisk
=== Work:
email: ries at livetravelguides.com
web:   http://www.livetravelguides.com




More information about the TYPO3-team-extension-coordination mailing list