It seems that I am being forced to not use getNodeAttribute in one
instance. I created a small example (see below) of where it seems to
fail. My little example contains two text boxes. You enter some text
in the first one and the onfocus handler for the second text box will
show you (via an alert function) the content of the first box. The
problem is that it doesn't work using MochiKit's getNodeAttribute. But
it does work using the less desirable construct...

text1Val = document.TheForm.text1.value;

Thanks for any explanation of why this is the case.

Mike

<html xmlns="http://www.w3.org/1999/xhtml"; xmlns:py="http://purl.org/
kid/ns#">
<script src="MochiKit.js" type="text/javascript">
</script>
<script type="text/javascript">
        function displayText1(e)
                {
                //Note if I substitute for the following line the following
                //this script will work properly.
                //textVal = document.TheForm.text1.value;
                text1Val = getNodeAttribute(document.TheForm.text1, 'value');
                alert('Text1 contains ' + text1Val);
                }
connect(self, 'onload', function(e)
                {
                connect(TheForm.text2, 'onfocus', displayText1);
                }
          );
</script>
<body>
        <form name=TheForm>
        <input type=text name=text1 \>
        <input type=text name=text2 \>
        </form>
</body>
</html>


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to