jquery ajax request is Forbidden in IE. How to fix (any workaround)?

Posted by 1gn1ter on Stack Overflow See other posts from Stack Overflow or by 1gn1ter
Published on 2010-03-26T09:49:23Z Indexed on 2010/03/26 10:13 UTC
Read the original article Hit count: 156

 <script type="text/javascript">
        $(function () {
            $("select#oblast").change(function () {
                var oblast_id = $("#oblast > option:selected").attr("value");
                $("#Rayondiv").hide();
                $.ajax({
                    type: "GET",
                    contentType: "application/json",
                    url: "http://site.com/Regions.aspx/FindGorodByOblastID/",
                    data: 'oblast_id=' + oblast_id,
                    dataType: "json",
                    success: function (data) {                       
                        if (data.length > 0) {

                            var options = '';
                            for (p in data) {
                                var gorod = data[p];
                                options += "<option value='" + gorod.Id + "'>" + gorod.Name + "</option>";
                            }
                            $("#gorod").removeAttr('disabled').html(options);

                        } else {

                            $("#gorod").attr('disabled', false).html('');
                        }
                    }
                });
            });
        });
</script>

© Stack Overflow or respective owner

Related posts about jquery-ajax

Related posts about asp.net-mvc