Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

creating the dropdown text and value returned from the servlet

Avatar

Level 7

I have created one servlet which runs whenever we select the dropdown and then it printwrite the key and value that should the dropdown text and value 

function callToServlet(txt){
		$.ajax({
  			type:'GET',
                        data: {
                        country : txt //let it be India
               },
        	url: '/bin/residential/country-dropdown',
            success: function(txt) {

	    console.log('success');
                console.log(txt);  //This is printing Key=Up, Value="Lucknow",etc
			}
		})
    }

 

Not I have to make it a drop down from the txt

1 Accepted Solution

Avatar

Correct answer by
Community Advisor
1 Reply

Avatar

Correct answer by
Community Advisor