Once again, the gecko scenario! The JSON used in this script to fill a listbox has been validated by JSONLint. The code snippet below demonstrates how the parsed data is placed in arrays:
pdata = jQuery.parseJSON(data);
ctype = pdata[0];
stype = pdata[1];
lizlist = pdata[2];
As the script progresses, I loop through the 'ctype' array (refer to the linked JSON file) using the following code:
lbt = "";
for(var i in ctype) {
lbt += "<option value=\""+ctype[i].id"\"+>"+ctype[i].type+"</option>"
}
However, despite my efforts, the listbox only displays the value "undefined" instead of the expected three options (including one header). To access the problematic javascript file, click here. The webpage where this issue arises is "http://texaslizardconnection.com/#newavailable". Here's some additional information about this javascript:
pdata[0]~pdata[2] should contain arrays.
pdata[2] should contain more arrays.
pdata[0] == pdata["cType"].
pdata[1] == pdata["sType"].
pdata[2] == pdata["lizlist"].