Hello -
I'm starting to noodle around with MochiKit after having done a bit of roll-my-own _javascript_ coding. I'm trying to do some DOM manipulation stuff and have run into a problem that I can't get past. I'm creating a couple of spans, appending them to the document's body and putting some text in each span. Right in front of the text I'm putting in the each span is '[object Object]'. I can't figure out what's making that happen. Here's my test page:
=======
<html>
<head>
<title>Test Page</title>
<script type = "text/_javascript_" src = "" </script>
<script language = "_javascript_">
var > {
var doc = currentDocument();
var leftSpan = SPAN(null, {'id' : 'leftSpan'});
updateNodeAttributes(leftSpan, {'style' : {'float' : 'left',
'margin' : '5px',
'padding' : '1em',
'border' : '2px ridge' }});
var rightSpan = SPAN(null, {'id' : 'rightSpan'});
updateNodeAttributes(rightSpan, {'style' : {'margin' : '0',
'padding' : '1em',
'float' : 'right',
'border' : '2px ridge' }});
appendChildNodes(doc.body, leftSpan);
appendChildNodes(doc.body, rightSpan);
appendChildNodes(rightSpan, "Here is some text");
appendChildNodes(leftSpan, "Here is some more text. It's longer than the text in the
} // onLoad
</script>
</head>
<body > <h1 align = "center">Test Page</h1>
</body>
</html>
=========
I've tried capturing the return value of each function call, just in case that's getting dumped into the output, but nothing stops the [object Object] from appearing on the page. Does anyone have any hints for this novice Mochikitter?
TIA,
- Craig
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
- [mochikit] [object Object] Craig Amundsen
- [mochikit] Re: [object Object] Bob Ippolito
- [mochikit] Re: [object Object] Craig Amundsen
