Hi, I'm well versed in JS - but I've been struggling to understand
MochiKit for a couple of days... help from anyone who can clear my
brainblock would be appreciated. Thanks.

I'm trying to add a form on the page dynamically. The H1 and [object
Object] form? gets displayed on the page... but I can't see the form
or access any of it's fields or submit it???

Here's my code:


MochiKit.DOM.withWindow(self.window, MochiKit.Base.bind( function() {

        var doc = MochiKit.DOM.currentDocument();
        MochiKit.DOM.appendChildNodes(doc.body, H1(null,"This gets added
OK"));

        var formObj = MochiKit.DOM.FORM({"id":"myForm",
"action":"test01.asp", "method":"post"}, {"inputs": [{"type":"text",
"id":"field1", "name":"field1", "value":"newval"}, {"type":"submit",
"name":"mySubmit", "value":"mySubmit"}]});

        MochiKit.DOM.appendChildNodes(doc.body, formObj);

alert(doc.body.formObj.field1);  // this indicates undefined?
alert(doc.formObj.field1);  // this indicates undefined?

}, this));


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MochiKit" group.
To post to this group, send email to mochikit@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to