Hi Damjan,
Could you provide us with a complete sample demonstrating this? I
tried the following html and it works both in FF 2.0 and IE 6.0.
<html>
<head>
<script src="mochi/packed/MochiKit/MochiKit.js"
type="text/javascript"></script>
<script type="text/javascript">
/* <![CDATA[ */
var testfunc = function(myObj, result) {
// callback, replaces the list of tags with those from the result
var oldtaglist = getFirstElementByTagAndClassName('ul',
'taglist', myObj.name);
var newtaglist = map(partial(LI, null), result.tags);
replaceChildNodes(oldtaglist, newtaglist);
}
connect(window, 'onload', function () {
testfunc({'name': 'container'}, {'tags': ['New', 'items']});
});
/* ]]> */
</script>
</head>
<body>
<div id="container">
<ul class="taglist">
<li>Old</li>
<li>items</li>
<li>here</li>
</ul>
</div>
</body>
</html>
Arnar
On 2/10/07, Damjan <[EMAIL PROTECTED]> wrote:
>
> This code work fine in Firefox but fails in IE 6.0.
> myObj in the callback is the object instance (this) .
> myObj.name is the id of a DIV element containing the ul.taglist
> element.
> In IE the call to get oldtaglist fails.
>
> TagList.prototype.cb_success = function(myObj, result) {
> // callback, replaces the list of tags with those from the result
> var oldtaglist = getFirstElementByTagAndClassName('ul', 'taglist',
> myObj.name);
> var newtaglist = map(partial(LI, null), result.tags);
> replaceChildNodes(oldtaglist, newtaglist);
> }
>
> I'm using Mochikit 1.4 from a svn checkout from a few days ago.
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"MochiKit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/mochikit?hl=en
-~----------~----~----~----~------~----~------~--~---