It isn't exactly clear from what you posted what is happening where. You want the change handler for the select lists returned by testGetCity.asp to call the checkCity function - correct?
The elements created and returned in testGetCity have an attribute "idname", that's not a valid attribute. To make use of jQuery give it name or an id (an id is better) that you can use to identify it.
The problem you have is that you're adding the elements dynamically after the ready handler has run. What you'll need to do is use on (
http://api.jquery.com/on/ ) and delegates to bind the change event for those select lists. Since you didn't post the markup for the page I'll just use the body as delegate...
- $("body").on("change", "#idOfElement", function() {
- alert("the selected value is:" + $(this).val());
- });