Not working in >IE8 #64
Comments
What's the expected behavior? What are you actually seeing (errors, broken UI elements)? |
I have two dropdowns in Wordpress, a category dropdown and a taxonomy dropdown. The taxonomy dropdown is populated based on the category dropdown. The first answer of here is my exact code: It populates in every other browser, but in IE it shows the "loading..." text and then a blank set of options |
Hmm, okay. I've never used WordPress or PHP, so I don't know how much I can help. You mentioned this only occurs in IE > 9; did you see any exceptions in the dev tools console? You could also try running your code without including JSON 2 or 3, since IE >= 8 includes a native JSON implementation. If the list still doesn't populate, it's likely not a JSON 3 issue. |
Yea, I've tried without JSON 2 or 3, and same thing, with no errors. Flip On Thu, Aug 28, 2014 at 7:09 PM, Kit Cambridge notifications@github.com
|
No worries; sorry I couldn't really help. I'll go ahead and close this issue... |
I have tried both JSON2 and JSON3, and I can't get it to work. Below is my JSON function, can anyone please tell me what is wrong?
jQuery(document).ready(function() {
(function ($) {
$('select[name="post_type"]').change(function (event) {
$("#location-dropdown").prop("disabled", true);
$('select[name="location"]').html("Loading...");
$.post("", {
action: 'wpse158929_get_terms_for_cpt',
post_type: $(this).val(),
taxonomy: ,
current_selected: $('select[name="location"]').val(),
nonce:
}, function( response ) {
if ( response && !response.error ) {
$('select[name="location"]').html(response.html);
$("#location-dropdown").prop("disabled", false);
}
}, 'json'
);
});
// Remove if you don't want to call change immediately.
$('select[name="post_type"]').change();
})(jQuery);
});
The text was updated successfully, but these errors were encountered: