0

I am using JSONP for cross-origin but issue not resolve

<!DOCTYPE html>
<html>
<head>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
</head>
<body>
    <p id="p1">this text should be changed,when the button is clicked</p>
    <div id="d1"></div>
    <div id="d2"></div>
    <div><img id="i1"></div>
    <button>click here</button>
</body>
</html>
<script>
    $(document).ready(function(){
        $("button").click(function(){
            $.ajax({
                url: "http://theoneinfotech.com/new_the_one/sp_api/master_tbl/get_body_type",
                dataType: "jsonp",
                type:'GET',
                success: function( response ) {
                    console.log( response ); // server response
                }
            });
        });
    });
</script>

api working fine, If put on Postman or on browser but not work here(http://localhost/new). how resolve it please help me.

thanks in advance

issue is--

jquery.min.js:2 Cross-Origin Read Blocking (CORB) blocked cross-origin response http://theoneinfotech.com/new_the_one/sp_api/master_tbl/get_body_type?callback=jQuery33104658196884971997_1548161549606&_=1548161549607 with MIME type text/html. See https://www.chromestatus.com/feature/5629709824032768 for more details. send @ jquery.min.js:2 ajax @ jquery.min.js:2 (anonymous) @ new:17 dispatch @ jquery.min.js:2 y.handle @ jquery.min.js:2

0 Answers0