Skip to content
This repository has been archived by the owner on May 28, 2019. It is now read-only.

Not working in >IE8 #64

Closed
guit4eva opened this issue Aug 28, 2014 · 5 comments
Closed

Not working in >IE8 #64

guit4eva opened this issue Aug 28, 2014 · 5 comments
Labels

Comments

@guit4eva
Copy link

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);
});

@ghost
Copy link

ghost commented Aug 28, 2014

What's the expected behavior? What are you actually seeing (errors, broken UI elements)?

@guit4eva
Copy link
Author

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:

http://wordpress.stackexchange.com/questions/158929/filter-second-dropdown-tax-based-on-first-dropdown-cpt

It populates in every other browser, but in IE it shows the "loading..." text and then a blank set of options

@ghost
Copy link

ghost commented Aug 28, 2014

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.

@guit4eva
Copy link
Author

Yea, I've tried without JSON 2 or 3, and same thing, with no errors. Flip
ha ha, I've basically spent my whole day trying to figure out why this
stupid browser doesn't work like all the others. Anyways, thanks for trying
to help, I'll keep trying and see what I can come up with

On Thu, Aug 28, 2014 at 7:09 PM, Kit Cambridge notifications@github.com
wrote:

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
http://msdn.microsoft.com/en-us/library/ie/gg589512%28v=vs.85%29.aspx?
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.


Reply to this email directly or view it on GitHub
#64 (comment).

@ghost
Copy link

ghost commented Aug 28, 2014

No worries; sorry I couldn't really help. I'll go ahead and close this issue...

@ghost ghost closed this as completed Aug 28, 2014
@ghost ghost added the question label Aug 28, 2014
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

1 participant