Hi.
I'm suffering from ajax using jquery.
I set up all ajax using jquery with jsonp.
taking lots of time, I succeeded to get with jsonp from Node.js server i made becuase I need to use another port beside 80.
Since it's not possible use POST type at all with jsonp, I rather starting to re-set up for same origin policy.
I recreate and clean the environment to use 80 port.
However, as I've been trying to send GET or POST to server, it drives me an error every single time.
is there anybody can help me?
Server Response:
{ "Version": "sdb.StorageManager", "Enable": "True", "EnableApi": [ "sdbSM" ] }
Jquery Request:
- $.ajax({
- type: "GET",
- url: '/api/status/',
- dataType: "json",
- success: function (json) {
- mSystem.SetStatus(json);
- },
- error: function () {
- alert("GetStatus function - error");
- },
- complete: function () {
- if(SuccessFlag == "true") {
- if(mSystem.GetStatus().Enable == "True") {
- alert(mSystem.GetStatus().Enable);
- PostAjaxAdd();
- } else {
- $.blockUI({
- message: '<h1>Server is Down<br/>for a moment..</h1>'
- });
- }
- } else {
- alert("GetStatus function - Cannot Success");
- }
- }
- });
on IE browser, as I type "http://localhost/api/status/"
it beautifully response with the json above.
but not Jquery ajax.
What should I do for this matter.
:(