Consider the following HTML: properties on links to absolute URLs, and Internet Explorer prior to version 9 will not correctly handle HTML5 elements without the addition of a separate compatibility layer. Note: In Internet Explorer up to and including version 9, setting the text content of an HTML element may corrupt the text nodes of its children that are being removed from the document as a result of the operation.
View Demo Download Files For our example, the markup will always be the same, just two simple select elements. The first just informs the user to select an option, and the next two are actual choices.
Some browsers may not return HTML that exactly replicates the HTML source in an original document.
For example, Internet Explorer sometimes leaves off the quotes around attribute values if they contain only alphanumeric characters.
This results in a Country drop-down field being updated with a list of countries based on the selection of the Language drop-down field, as shown in this illustration.
This article discusses how to use an AJAX call to the following AEM endpoint to get the data based on the selection of the first dropdown field: AJAX call returns data in the following format: A Client Lib folder that contains script that makes an AJAX call that returns data used to populate the Data Source object - which is used to dynamically update the drop-down field in the Touch UI dialog.
The second select only has one option telling the user to please pick from the first dropdown first.
An alternative is to store the data that you need in JSON format.
Discusses how to create an AEM Touch UI component that has a Touch UI dialog where a drop-down field is dynamically updated with data returned from an AJAX call.
A special thank you to Praveen Dubey for contributing an AEM package that is used in this article.
It's great community members like Praveen that helps the overall AEM community.
If you would like to contribute in this manner to help the AEM community, please reach out to the AEM community manager, Scott Macdonald ([email protected]).