Click here to Skip to main content
16,022,536 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi ,
i m using jquery code in my asp.net application . i used url:- https:tk2....
insted of http:localhost.....
when i am try traced i found an above error message. this is the function returning the error message.

any one please help me , very urgent

JavaScript
function CallService() {
                $.ajax({
                    type: varType, //GET or POST or PUT or DELETE verb
                    beforeSend: function(xhr) {
                        xhr.withCredentials = true;
                        xhr.setRequestHeader('Authorization', 'Basic ' + $.base64.encode($("#tbxUserName").val() + ':' + $("#tbxPassword").val()));
                    },
                    url: varUrl, // Location of the service
                    data: varData, //Data sent to server
                    contentType: varContentType, // content type sent to server
                    dataType: varDataType, //Expected data format from server
                    processdata: varProcessData, //True or False
                    success: function(msg) {//On Successfull service call
                        //alert('success');
                        ServiceSucceeded(msg);
                    },
                    error: function(msg) {//On UnSuccessfull service call
                        alert('failed');
                        ServiceFailed(msg);
                    }
                });
            }
Posted
Updated 8-Aug-12 19:35pm
v2
Comments
StianSandberg 9-Aug-12 2:36am    
You cant get data from another domain using javascript. You could use jsonp, but in this case i think you should use some serverside code to download the site you need, and call that page (on your domain) with ajax.

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