I am using country and state dropdowns in my form. Whenever the user selects the country in the dropdown, the respective states of the country will populate in the states dr
I had the same problem after receiving an AJAX HTML-Request with the function jQuery.ajax() and then trying to parse the result with jQuery( html_result_data ). The solution was to strip the header and all tabs and "returns" in the html_result_data like this:
success: function( data ) {
// God this is ugly
data = data.split("")[1].split("")[0];
data = data.split("\t").join("").split("\r").join("").split("\n").join("");
data = jQuery( data );
...
}