0 Replies Latest reply on Aug 18, 2014 8:15 AM by danstein01

    Need help communicating between Edge composition and web page


      Asking this question again - I'm surprised that I got no response the first time, but I will rephrase it in the hopes that someone can help me.


      I have a web page which provides information to a user by reading and displaying data from an XML file. The data is sorted by geographical location - actually by State, as this is a U.S.-based data-set. The page is designed so that the user can either select the State from a drop-down menu, or by clicking on a map.


      I have built the map in Adobe Edge - that composition gets loaded into the web page, while the rest of the page (drop-down menus, radio buttons, display fields, etc.) are all built in Dreamweaver.


      Currently, I am able to communicate in one direction - from the web page to the Adobe Edge composition. When the user selects a State in the drop-down menu, I am able to tell the Edge composition to update the map and display which State has been selected. However, I also need the communication to go the other way - when the user selects a State on the map, I need to update the drop-down menu to reflect that selection. So far, I have had no success doing this.


      The map is built like this: there is a base image that shows all the States. Above the base image, each State has a "highlight state" element (named "StateAbbreviation_on"), which is initially hidden. And above the "highlight state," there is a hotspot (named "StateAbbreviation_off") with opacity set to 0, which receives the mouse-click to select the state. Each hotspot gets an onClick() function, as folllows:


      function onClick(obj, myButton){


                  // stArray is an array of all State abbreviations (i.e. [AL,AK,AZ...WY])

                  //loop through ALL states and turn them off. This is in case the state is picked from the drop-down menu


                  for (var i=0; i<stArray.length; i++){

                      var tempTarget = stArray[i];

                       var tempName = (tempTarget+"_on");




                  //get the name of the clicked button (passed in as myButton), remove "_off" and add "_on" to construct the new name

                  //then show the selected state


                  var myTarget = myButton;

                  var myName = myTarget.slice(6,8);

                  var newName = (myName+"_on");





      I believe there is a way that I can return a value to my enclosing web page, in order to update the drop-down menu to show the selected State - but I can't figure out how to do it. Help, please?