Hi all (again),
I pressed the "Send" button by accident. No doubt my original message
doesn't make sense at all. Below is the real original message that you
should read instead. Read on!
I've discovered a bug where mxAjax.Select chokes on a value that
contains a comma.
For example, an excerpt of the "getSchoolArray" ColdFusion function
(below) returns a CF array, which works fine including the
"org_unit_nm" variable that contains commas, e.g. "School of
Education, Science, Maths and Training" (notice the 2 commas there):
<cfloop query="schools">
<cfset arrayAppend(schoolArray, "#org_unit_cd#,#org_unit_nm#")>
</cfloop>
<cfreturn schoolArray>
Next is the JavaScript code that populates the "target" drop down menu
with the CF array data.
When it encounters values that contain commas such as "School of
Education, Science, Maths and Training", it truncates the value to
"School of Education" instead. It does not include the rest of it,
which is ", Science, Maths and Training".
Since the CF array of values do contain commas, I think the parser in
JavaScript which is mxAjax.CFArrayToJSKeyValueParser() is the real
culprit and therefore chokes on the commas.
Have we got a workaround? Have anyone got this problem and found the
solution? Thanks
function populateDropDownMenus(source, target, cffunctionURL) {
var url = cffunctionURL;
new mxAjax.Select({
parser: new mxAjax.CFArrayToJSKeyValueParser(),
executeOnLoad: false,
target: target,
paramArgs: new mxAjax.Param(url,
{param:"facultyCode={"+source+"}", cffunction:"getSchoolArray"}),