On my screen there are several clickable objects that represent objects inside a piece of software interacting through a COM component.
When I click on an object, I send the name of the object, the session ID, and the command I want to run.
The code for the specific command I'm trying to implement is a C # based ASP.NET page:
case "myClick": dynamic simObj = S8COM.get_SimObject(Request["id"]); responseData = "{name:" + simObj.Name.ToString() + ",countInRoutes:" + simObj.CountInRoutes.ToString() + ",countOutRoutes:" + simObj.CountOutRoutes.ToString() + ",index:" + simObj.Index.ToString() + ",capacity:" + simObj.Capacity.ToString() + ",completed:" + simObj.Completed.ToString() + ",routeOutMethod:" + simObj.RouteOutMethod.ToString() + "}"; break;
This works fine for some objects, but not for others, throwing an "Uncaught SyntaxError: Unexpected number" exception.
The JS that I use to call this particular function is:
S8Web.Requestmanager.makeRequest({ data: { command: "myClick", id: aItem.id }, async: true, callback: function(data){ alert(data.CountInRoutes);
A couple of answers also, the first works fine, while the second throws an "Unexpected number" exception:
jsonp1319203225074({name:Start,countInRoutes:0,countOutRoutes:1,index:5,capacity:0,completed:0,routeOutMethod:4}); jsonp1319203225066({name:Process 1,countInRoutes:1,countOutRoutes:1,index:1,capacity:1,completed:0,routeOutMethod:1});
The only thing I see that can affect the result is the gap between the βProcessβ and β1β. Is this what throws this error?