Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11571

jquery.ajax -- no access control allow origin -- Urgent help

$
0
0

Hi All

I am hitting web services using the below code. but I get "no access control allow origin' header in present on the request resource. origin site is therefore not allowed access.

<script language="javascript" src="/Style%20Library/Jquery/jquery-1.11.1.js" type="text/javascript"></script><script language="javascript" src="/Style%20Library/Jquery/jquery-1.11.1.min.js" type="text/javascript"></script><script language="javascript" src="/Style%20Library/Jquery/jquery.spservices-0.7.2.js" type="text/javascript"></script><script language="javascript" src="/Style%20Library/Jquery/jquery.spservices-0.7.2.js" type="text/javascript"></script><script type="text/javascript">


var firstURL;

firstURL = 'web services url;

alert(firstURL);

$.support.cors = true;

                $.ajax({

crossDomain: true,

                        type: 'POST',
                        url: firstURL,                      
                        data: {},
                        dataType:'json',
                        success:function(data)
{             

alert('success');
                                                                                                rcvtoken = JSON.stringify(data);
  secondURL = 'url';
window.location.replace(secondURL);
},
                    error:function(jqXhr, textStatus)
{
                                                                                 alert('Unable to redirect to the EDGE Portal. Please contact your administrator - ' + JSON.stringify(jqXhr));
}                                                             
});</script>

can some please help on this, this issue is already Escalated..

Thanks & Regards

Rakesh



Viewing all articles
Browse latest Browse all 11571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>