Re: Updating two div layers with HTML_Ajax
| From: | Dan Rossi | Date: | Thu, 19 Jan 2006 00:22:03 +0000 |
| Subject: | Re: Updating two div layers with HTML_Ajax | ||
| References: | 1 2 3 4 5 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-22587@lists.php.net to get a copy of this message | ||
Are you stripping scripts from the output ? Anyway I was hoping you could help me try and call two methods at once, as this option doesnt work , ive tried changing the layer on the first click however the title is changing way before the content is displayed. Let me know right now its only firing the first method.
On 19/01/2006, at 4:01 AM, Joshua Eichorn wrote:
Dan Rossi wrote:On 18/01/2006, at 7:16 PM, Dan Rossi wrote: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. 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); } -josh -- PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.phpProxy 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>