As stated in comments, you can't directly interact with a page already rendered using an AJAX call, so you have to do some work on client side.
Here an example, based on the code you showed us:
c#:
//import this namespace:
using System.Web.Script.Serialization;
// declare a class to contain all the info you will need client-side
[Serializable]
public class GenericResult
{
public int OrderReference { get; set; }
public string URL {get; set;}
public string EID { get; set; }
public string Comment { get; set; }
// etc. etc.
}
//In your static method, instance and populate such class:
var r = new GenericResult();
r.OrderReference = 34;
r.URL = "http://www.google.com";
r.EID = "someString";
r.Comment = "this will work like a charm";
this.Response.ContentType = "application/json";
this.Response.Write(new JavaScriptSerializer().Serialize(r));
JS:
//In your AJAX 'onsuccess' callback, you can use the object very easily, eg:
function callback(r){
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = r.URL;
document.getElementsByTagName('body')[0].appendChild(script);
}
I have not tested this, so it may contains any typos, but that should be enough to let you to adapt your code.
EDIT:
success: function (result) {
//what is the next line for?!?!?!
//if (result.hasOwnProperty("d")) { result = result.d; }
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = result.Script;
document.getElementsByTagName('body')[0].appendChild(script);
}