I have tried lot regarding Post form data to Cross domain using Ajax post method. but i received success response. but the Form data is not posted to the requested cross domain instead of shows 404 network error in browser.
can anyone suggest How to Post the Form Data to Cross domain in ASP.NET MVC application?
Related
i am working in zend project and need to post request to certain page via ajax. Then i need to carry the request data and post it to another controller and action of same project which should return me some data as well.
I am developing a server side web app using spring socialauth library by 3 pillars lab.
When accessing this web app using href in an anchor tag, I am able to invoke the 3rd party application (in my case, facebook) page.
But when i tried calling it using jquery ajax I got "Allow origin header error". On searching for this error, I found out that this error is due to the ajax calling page and the URL, it is trying to call, being on different domains. I have changed the headers in my webapp as: "allow origin to *". After this, my webapp does not throw this "allow origin header" error but now 3rd party app is throwing this error.
I have tried two types of Cross domain ajax method :
JSONP: with this i am able to hit even 3rd party url via ajax but it is throwing an error
"Resource interpreted as Script but transferred with MIME type text/html"
As per my understanding, it is throwing error because this method expects JSONP as response instead getting text/html in response.
CORS (Cross-Origin Resource Sharing):
In this also, facebook is throwing allow origin header.
I want to make ajax call to facebook using my webapp that uses socialauth library and it should display facebook page. Plus i dont want to redirect it.
I am stuck at this. Please help.
I am trying using facebook from Scrapy.
I can log in successfully. However, I can't get the posts on facebook because the posts comes from ajax calls.
I tried using firebug and check the XHR. I got this:
I tried to check the response of all those request but none of them contains the actual data of the posts.
What is the ajax request that get the posts on facebook?
Thanks in advance
Don't use the AJAX calls from your browser. Those are encrypted since Facebook uses HTTPS connections. Focus on using their API to make the calls you need to get the data you want. That's the entire purpose of their Graph API.
I would like to integrate some Ajax techniques into an existing struts application.
How do I send the requested data back server side to the client without causing the page to reload?
If you called the server side with Ajax, the page will not reload. You don't have to do anything special on the server side. Although, obviously, you should do your Ajax request to a different page made for that purpose, not to the same page.
I am using cybersource as the payment gateway for my application. The payment information is sent correctly if we post the form without using an Ajax request.
Now we need to implement this by using an Ajax request. I tried passing the information to cybersource but got a javascript error "access denied" when I tried to submit the form using Ajax post request.
When I tried to debug this issue the line "mypostrequest.open("POST", "theUrl", true);" was giving the error.
Is there any reason why a site might block a post request through Ajax and not block a request from the usual form post ?
Thanks in advance.
There should be no difference, from the perspective of the CyberSource server, between a post via AJAX or a normal form submit, so the server would not have a basis for deciding to block a post via AJAX. The "access denied" problem might be due to the fields and values you included in your post. Make sure all required fields are included.