jquery - Window not redirected to correct URL passed from Json return -


function getopenurl(transactionid, legacyindication)     {         var json = {             id : transactionid,             legacyindication : legacyindication         };          $.ajax({             type: "post",             url: "<%= url.action("opensavedindication", "indications") %>",             data: json,             success: function(data) {                 alert(data);                 //window.location = data;             }         });     } 

so when perform alert, correct url:

"/extranet/mvc/indications.cfc/economics/02559e2e-d48e-4623-b877-69f36aa8b011"

however, if let run, error page says:

description: http 404. resource looking (or 1 of dependencies) have been removed, had name changed, or temporarily unavailable. please review following url , make sure spelled correctly.

requested url: /extranet/mvc/indications.cfc/"/extranet/mvc/indications.cfc/economics/02559e2e-d48e-4623-b877-69f36aa8b011"/extranet/mvc/indications.cfc/"/extranet/mvc/indications.cfc/economics/02559e2e-d48e-4623-b877-69f36aa8b011"

what happening?

edit:

controller action return code:

return json(url.action("economics", new { id = indicationbase.id })); 

i changed controller action return id, , redirect this:

var iddata = json.parse(data); window.location = "economics/" + iddata.id; 

seems work fine.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -