Click here to Skip to main content
15,890,186 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello everyone,

I enjoying jquery last two days but my friend ask me help for get a value from wcf services with the help of jquery. I trying on this type but value can't be find till date.
JavaScript
$(document).ready(function () {
            $.ajax({
                type: "GET",
                url: "http://www.customer-supports.com/WcfService2/Service1.svc/Getjson",
                dataType: "json",
                success: function (xml) {
                    alert('have a nice day');
                    //$(xml).find('Product').each(function () {
                    //    var id = $(this).find('COUNTRY_CODE').text();
                    //    var name = $(this).find('COUNTRY_NAME').text();
                    //    var price = $(this).find('IP').text();
                       
                    //    $('<tr><td>' + id + '</td><td>' +
                    //    name + '</td><td>' + price + '</td><td>').appendTo('#products');
                    //});
                },
                error: function (xhr) {
                    alert(xhr);
                }
            });
        });

every time compiler goes to error function. mainly I want the data of country code. try this link and get a value of data and showing alert. http://www.customer-supports.com/WcfService2/Service1.svc/Getjson[^]
Posted
Comments
Please check FireBug Console, if there are any errors listed?
joginder-banger 14-Jan-15 8:04am    
i solve this problem itself and thanks for reply..
Cool Jogi. :)

1 solution

Try This link.........
Calling WCF Services using jQuery[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900