OK so my asp.net MVC4 controller called Home is almost restful, so if I do this in Firefox or IE
http://localhost:1193/Home/?serialcode=123456789123321
It gracefully shows a page with a code like 82434234 calculated using the serialcode above.
Now the controller supports returning XML data, tested and works with C# code. Now I'm stuck at the final step...ehm...sending a simple ajax request to get the code. This is what i have so far
var xmlHttp;
**//Problem 1: not sure what url should be like, given above Firefox
// example ? Should the word Home , or index be in it?**
var url = "index?serialcode=123456789123321";
if (window.XMLHttpRequest) {
// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp = new XMLHttpRequest();
}
else {
// code for IE6, IE5
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
xml.dataType = "xml";
**// Problem 2: this line doesn't do anything below**
xmlHttp.open("GET", url , true);
xmlHttp.send(imei);
Any help GREATLY appreciated...thanks :)