PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » HTML » HTML_AJAX » Bug #6478

HTML_Ajax_Action: $response->assignAttr not working for firefox in some instanc

Details

Submitted2006-01-12 13:37 UTC
Fromsjoerdvannoort at gmail dot com
Assignedjeichorn
StatusClosed
PackageHTML_AJAX
PHP Version5.1.1
Roadmaps(Not assigned)

Comments

[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';");

[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