2 Replies Latest reply on Nov 30, 2012 5:32 PM by masabaixiong

    How can I link to pages in a 2 level popup index/selection tree with java script?

    masabaixiong

      I can do a single level popup index using the java script below (#1) and link the selections to pages but to change to a  2 level popup index selection tree as below (#2) I can't seem to figure out how to link to pages. Any help greatly appreciated. Thanks

       

      1

      var itemIndex = app.popUpMenu("INTRODUCTION", "ALPHABET", "GRAMMAR", "NUMBERS", "DATES & TIME", "GETTING TO KNOW PEOPLE", "PHRASES FOR LEARNING", "DIRECTIONS & TRANSPORTATION", "DESCRIBING THE TRAIL", "DO'S & DON'TS", "EQUIPMENT", "FOOD", "INTRODUCING A VILLAGE", "CULTURE AND ETHNIC GROUPS", "HANDICRAFTS", "TEMPLES & MONKS", "AGRICULTURE", "ANIMAL HUSBANDRY", "SCHOOL & EDUCATION", "LEADING A TREK", "NATIONAL PROTECTED AREAS", "IDENTIFYING WILDLIFE", "PLANTS & FORESTS", "BOATS", "CAVES", "HEALTH AND SAFETY")

      switch (itemIndex) {

      case "INTRODUCTION":

      this.pageNum = 1

      break

      case "ALPHABET":

      this.pageNum = 2

      break

      case "GRAMMAR":

      this.pageNum = 5

      break

      case "NUMBERS":

      this.pageNum = 30

      break

      case "DATES & TIME":

      this.pageNum = 35

      break

      case "GETTING TO KNOW PEOPLE":

      this.pageNum = 42

      break

      case "PHRASES FOR LEARNING":

      this.pageNum = 56

      break

      case "DIRECTIONS & TRANSPORTATION":

      this.pageNum = 59

      break

      case "DESCRIBING THE TRAIL":

      this.pageNum = 63

      break

      case "DO'S & DON'TS":

      this.pageNum = 68

      break

      case "EQUIPMENT":

      this.pageNum = 74

      break

      case "FOOD":

      this.pageNum = 83

      break

      case "INTRODUCING A VILLAGE":

      this.pageNum = 96

      break

      case "CULTURE AND ETHNIC GROUPS":

      this.pageNum = 105

      break

      case "HANDICRAFTS":

      this.pageNum = 120

      break

      case "TEMPLES & MONKS":

      this.pageNum = 126

       

      break

      case "AGRICULTURE":

      this.pageNum = 131

      break

      case "ANIMAL HUSBANDRY":

      this.pageNum = 140

      break

      case "SCHOOL & EDUCATION":

      this.pageNum = 145

      break

      case "LEADING A TREK":

      this.pageNum = 151

      break

      case "NATIONAL PROTECTED AREAS":

      this.pageNum = 155

      break

      case "IDENTIFYING WILDLIFE":

      this.pageNum = 161

      break

      case "PLANTS & FORESTS":

      this.pageNum = 169

      break

      case "BOATS":

      this.pageNum = 175

      break

      case "CAVES":

      this.pageNum = 178

      break

      case "HEALTH AND SAFETY":

      this.pageNum = 182

      break

      }

       

      2

      var aINTRODUCTION = ["INTRODUCTION", "How to Use This Book", "Format"];

      var aALPHABET = ["ALPHABET", "Vowel Sounds", "Consonant Sounds"];

      var itemIndex = app.popUpMenu(aINTRODUCTION, aALPHABET);


      Thanks.