Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.5.8

Bug #6478 HTML_Ajax_Action: $response->assignAttr not working for firefox in some instanc
Submitted: 2006-01-12 13:37 UTC
From: sjoerdvannoort at gmail dot com Assigned: jeichorn
Status: Closed Package: HTML_AJAX
PHP Version: 5.1.1 OS:
Roadmaps: (Not assigned)    
Subscription  


 [2006-01-12 13:37 UTC] sjoerdvannoort at gmail dot com
Description: ------------ HTML_Ajax_Action exibites strange behaviour on the client side in firefox. The example below concerns changing the class of an element. But I have experienced similer problems with changing the disabled attribute off form controls The following line works for firefox, not in IE because the attribute name should be 'className': $response->assignAttr('admin_status_div'.$orderId, 'class', 'admin_status_display_2'); // This works in IE, not in firefox $response->assignAttr('admin_status_div'.$orderId, 'className', 'admin_status_display_2'); // This works in both IE and Firefox $response->insertScript( "document.getElementById('admin_status_div".$orderId."').className = 'admin_status_display_2';");

Comments

 [2006-01-12 17:12 UTC] jeichorn at php dot net
were using setAttribute on the javascript side with assignAttr. It doesn't work quite how one would expect in FireFox, im testing switching to directly setting the attribute, but I think were just in a hard place. In firefox there seems to be a distinction between an elements DOM attributes and there Javascript versions.
 [2006-01-27 16:07 UTC] jeichorn at php dot net
Fixed in svn, will be in 0.3.4