Problem with selecting item in Element container

TestHtml.html (4.1 KB)

Hello

  1. I'm trying to embed this html into a map component TTMSFNCGoogleMaps on c++ builder xe12.
    When I test it in my web browser, when I select an item from the drop-down list, this item becomes the current one.
    But when I try to embed this html into the map, when I select an item from the drop-down list, this item does not become the current one.
    Maybe for some reason the item selection script is not working for map.

Can you help me how to properly embed this html into the map?
I assume that it needs to be divided into sections "html", "script" and "style".

TTMSFNCMapsElementContainer* containter = TmsMap->AddElementContainer();
containter->HTML="..";
containter->Script="..";
containter->Style="..";

  1. How do I create an event handler for selecting an item from a list in c++ code?
    From the examples, I realized that you need to add Actions.
    But what specific Actions settings do I need to apply so that the drop-down list works as a vcl component of TComboBox and the onChange event is triggered?

Best regards, Eugene

Hi,

  1. Yes, add HTML, Script and Style elements separately to the container.

  2. Make sure the HTML object you want to interact with has an ID attribute value set. Then use the ID as the ElementContainers[].Action[].HTMLElementID value and assign the OnExecute event with the code you want to have executed. If you want the HTML element to interact using it's OnChange event, set the ElementContainers[].Action[].Event to heChange.

Please have a look at the ElementContainers demo included with TMS FNC Maps. This application demonstrates the use of Actions in combination with ElementContainers.