Re: Updating two div layers with HTML_Ajax
| From: | Joshua Eichorn | Date: | Wed, 18 Jan 2006 17:01:18 +0000 |
| Subject: | Re: Updating two div layers with HTML_Ajax | ||
| References: | 1 2 3 4 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-22585@lists.php.net to get a copy of this message | ||
Dan Rossi wrote:
On 18/01/2006, at 7:16 PM, Dan Rossi wrote:If you return and HTML_AJAX_Action object you can perform a bunch of different JS actions see: http://htmlajax.org/HTML_AJAX/Using%20haSerializer? You can also eval the script blocks after they have been added to the dom (This is what a feature request would be for) var scripts = document.getElementById('title').getElementsByTagName('script'); for(var i = 0; i < scripts.length; i++) { eval(scripts[i].innerHTML); } -joshProxy usage, which way is better ? Im having some performance issues with live server it seems pretty slow to load, and the message div isnt showing but is on my machine. As crap as it is the live server is running PHP 4.2.2 could this be an issue ?Just to confirm not even putting this in the data returning to the div layer will work, ideally this would be preferable to just write to the title div on the method call. <script language="JavaScript">document.getElementById('title').innerHTML = 'test'; </script>Script blocks aren't automatically processed when you add them with innerHTML. At the moment there is nothing in HTML_AJAX to help you would with this, feel free to open a feature request.