I have three dropdowns that I need to autopopulate and it won't work. When using the JavaScript Debugger I can see that it says "TypeError:... is not a function" but not sure how to fix.
The Three dropdowns are called:
ddlIncidentLoc
ddlIncidentArea
ddlIncidentSubArea
Here is the code:
form1.#subform[0].#variables[0].asaScript - (JavaScript, client)
var g_ArrayOfficeInfo = new Array(
new Array("Market Tower", new Array("Reception area", "Desk", "Interview booth", "Waiting room", "Telephone", "E-mail", "Other: ")),
new Array("GCCRC", new Array("Reception area", "Desk", "Interview booth", "Waiting room", "Telephone", "E-mail", "Other: ")),
new Array("SLNRC", new Array("Reception area", "Desk", "Interview booth", "Waiting room", "Telephone", "E-mail", "Other: ")),
new Array("LUSO", new Array("Reception area", "Desk", "Interview booth", "Waiting room", "Telephone", "E-mail", "Other: ")),
new Array("NE", new Array("Reception area", "Desk", "Interview booth", "Waiting room", "Telephone", "E-mail", "Other: "))
);
var g_ArrayFieldInfo = new Array(
new Array("Home visit", new Array("Name:")),
new Array("Shelter", new Array("Name:")),
new Array("Hospital", new Array("Name:")),
new Array("Court House", new Array("Name:")),
new Array("Provincial Offences Office", new Array("Name:")),
new Array("Purchase of Service Agency", new Array("Name:")),
new Array("Other:", new Array("Name:"))
);
var g_ArrayPublicInfo = new Array(“Specify:”);
var g_ArrayLocInfo = new Array(g_ArrayOfficeInfo, g_ArrayFieldInfo, g_ArrayPublicInfo);
function updateAreas(objDropDown, nLocIndex)
{
var arrayLocInfo = g_ArrayLocInfo[nLocIndex];
for (var i=0; i<arrayLocInfo.length; i++)
{
objDropDown.addItem(arrayLocInfo[i][0], String(i));
}
}
function updateSubAreas(objDropDown, nLocIndex, nAreaIndex)
{
var arrayLocInfo = g_ArrayLocInfo[nLocIndex];
var arrayAreasSubAreas = arrayLocInfo[nAreaIndex][1];
for (var i=0; i<arrayAreasSubAreas.length; i++)
{
objDropDown.addItem(arrayAreasSubAreas[i], String(i));
}
}
form1.#subform[0].ddlIncidentLoc::change - (JavaScript, client)
if (this.rawValue != xfa.event.newText)
{
ddlIncidentArea.rawValue = "";
ddlIncidentArea.clearItems();
ddlIncidentSubArea.rawValue = "";
ddlIncidentSubArea.clearItems();
asaScript.updateAreas(ddlIncidentArea, this.boundItem(xfa.event.newText));
}
form1.#subform[0].ddlIncidentArea::change - (JavaScript, client)
if (this.rawValue != xfa.event.newText)
{
ddlIncidentSubArea.rawValue = "";
ddlIncidentSubArea.clearItems();
asaScript.updateSubAreas(ddlIncidentSubArea, ddlIncidentLoc.rawValue, this.boundItem(xfa.event.newText));
}
Views
Replies
Total Likes
Hope that helps.
Views
Replies
Total Likes
Views
Replies
Total Likes
Link didn't work.
Views
Replies
Total Likes
I just tested and link works for me. Also, I just got it working by deleting and retyping the quotes around 'Specify: '. Go figure!
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies