A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: using nextSibling on button click

  1. #1
    Senior Member
    Join Date
    Apr 2001
    Posts
    528

    using nextSibling on button click

    I have a situation where a user needs to click a button to cycle through multiple fields at the same level. IN this example they have a scenario and are presented a question. That question level takes them to a the location in the XML where they will have multiple feedbacks. I want to use nextSibling to go to the next feedback when the button is clicked but I don't quite know how to structure that.

    So if they have
    currFeedback = XPathAPI.selectSingleNode(myXML.firstChild, "scenario/question/level[@id='"+startLevel+"'").firstChild.firstChild.nodeV alue;

    Thanks.

  2. #2
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    can you not use XPathAPI.selectNodeList() to return an array of nodes matching the your XPathAPI statement ? you could then simply cycle through the array ?

    PHP Code:
    var thePath_str:String "scenario/question/level/id";
    id_array = [];
    id_array XPathAPI.selectNodeList(this.firstChildthePath_str);
    for (var 
    i:Number 0id_array.lengthi++) {
    trace(id_array[i].firstChild.nodeValue+newline);


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center