Reputation: 1
Hello all: I am reaching out for help and not being a programmer I am rather determined to find a solution to an application problem. I have a web application that was built in 2009 and was implemented on a self hosted server. We recently decided to shut down our servers and so I needed a new home for the application and the decision was made to move it to Godaddy.
Most everything worked on the application with the exception of one feature which I think I understand and will describe.
First the application is really two applications that share information. One is a model building application where we build complex models that become “shells” for configuring products. The second application uses the “shells” and walks the end user through the processes of configuring product features and variables.
As it stands the model building side of the application appears to be working fine. The configuring side “mostly” works. However NEW shells that we create since moving to GoDaddy are not being read correctly on the configuration side. And although existing configurations can be edited (they reside on the configuration side) and the functions all work, it is only the “new” models ( that reside on the model building side) that are not seen.
Both applications are hosted on a shared deluxe hosting account, IIS6, ASP.NET 2.
When a new model is created it is saved in a model directory when a user on the configuration side selects to build a new configuration. The configuration app is supposed to read the contents of that directory and present the user with a list of model to choose to configure.
After spending hours looking for the cause I think that the problem is specifically related to those functions managing the communication between the two applications.
While using Chrome I can see an Uncaught SyntaxError: Unexpected token {
Any Ideas or help trouble shooting this will be greatly appreciated!
some code.... }
function newConfigurationHandler(responseText) {
var response = JSON.parse(responseText);
*Uncaught SyntaxError: Unexpected token { *
//alert(response.success + ', ' + response.error);
if (response.total > 0) {
var i = 0;
var cb = '<select id="cmbModel">\n';
cb = cb + '<option value="">- select a model -</option>';
for (i = 0; i < response.results.length; i++) {
cb = cb + '<option value="' + response.results[i].modelId + '">'
+ response.results[i].name
+ (response.results[i].description != '' ? ' - ' + response.results[i].description : '')
+ '</option>\n';
}
cb = cb + '</select>';
Ext.Msg.show({
title: 'Select a model to configure',
msg: 'Model: ' + cb,
more code....
Upvotes: 0
Views: 857
Reputation: 2328
{
{
"total": 0,
"results": "",
"error":""
}
}
isn't a valid JSON object. It has to have only one pair of {}
or a key to assign those values, for example:
{
"total": 0,
"results": "",
"error":""
}
or
{
"response": {
"total": 0,
"results": "",
"error":""
}
}
Upvotes: 1