Friday, May 1, 2009

Picking a single node from an eventObj

While we have already done code for a walkthru of all of the notes, after a column of buttons to our Daily Activity Worksheet Form it is important for us to be able to select values associated with that row, and only that row.

The object orientation of the JSCript code makes that a snap.

The button that was pressed, in particular, is the eventObj passed to the event handler. The "Source" Property is a reference to the other items in the row.

If we reference the form as seen, then the particular participant bound to the button in the row pressed is referenced as eventObj.Source.selectSingleNode("my:Participant").text



One important item of note, while doing the walkthru we used the path starting at the root... i.e. "//my:Participant". Since the button is already below the parent you need to reference it as "my:Participant" or at best, you'll always get the first child node.