Hi
Not surprising, I havent had any luck either with xpath syntax like
[/name/text()='" + this.value + "']"; What I did end up doing is
creating a datapointer and walking through the elements manually,
stopping on the match...
Laszlo doesnt support the "full" xpath syntax and I am assuming that
is one of the syntax's it does not support...
Z
On 7/11/06, Chandra Shekhar Reddy Potula
<[EMAIL PROTECTED]> wrote:
>
> I have a dataset with two book elements. Each book element in turn has two
> child elements called 'name' and 'author'. I am displaying book names in the
> combobox. When the user selects a particular book name in the combo box, he
> should be able to see the author for the selected book.
>
> <dataset name="dcrunstatdataset">
> <books>
> <book>
> <name>book1</name>
> <author>author1</author>
> </book>
> <book>
> <name>book2</name>
> <author>author2</author>
> </book>
> </books>
> </dataset>
>
> In order to achieve this, I have to set the datapath to the book element
> (i.e. the parent element) corresponding to the book name selected in the
> combo box, on the 'onselect' event.
> <combobox id="dcrunnamecmbbox" width="200"
> editable="false" >
> <textlistitem
> datapath="dcrunstatdataset:/books/book"
> text="$path{'name/text()'}"
> value="$path{'name/text()'}">
> </textlistitem>
> <method event="onselect">
> var dp = "dcrunstatdataset:/books/book
> [/name/text()='" + this.value + "']";
> Debug.write("dp: " + dp);
> recordview.setAttribute("datapath", dp);
> </method>
> </combobox>
> I am unable to get the book element (i.e. the parent element) corresponding
> to the book name selected in the combo box.
>
>
>
>
> ________________________________
> Find out what India is talking about on Yahoo! Answers India.
> So, what's NEW about the NEW Yahoo! Messenger? Find out.
>
>
> _______________________________________________
> Laszlo-user mailing list
> [email protected]
> http://www.openlaszlo.org/mailman/listinfo/laszlo-user
>
>
>
>
_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user