hmmm, seams to be an issue with templartes, I'll log this as a bug.
for a workaround, move the create dynamic array code that is at lines 102 - 148:;
<?php
if ($row_rsTowns) {
echo "<SC" . "RIPT>\n";
echo "var WAJA = new Array();\n";
$oldmainid = 0;
$newmainid = $row_rsTowns["Town_CountyID"];
if ($oldmainid == $newmainid) {
$oldmainid = "";
}
$n = 0;
while ($row_rsTowns) {
if ($oldmainid != $newmainid) {
echo "WAJA[".$n."] = new Array();\n";
echo "WAJA[".$n."][0] = '".WA_DD_Replace($newmainid)."';\n";
$m = 1;
}
echo "WAJA[".$n."][".$m."] = new Array();\n";
echo "WAJA[".$n."][".$m."][0] = "."'".WA_DD_Replace($row_rsTowns["Town_IDX"])."'".";\n";
echo "WAJA[".$n."][".$m."][1] = "."'".WA_DD_Replace($row_rsTowns["Town_Name"])."'".";\n";
$m++;
if ($oldmainid == 0) {
$oldmainid = $newmainid;
}
$oldmainid = $newmainid;
$row_rsTowns = mysql_fetch_assoc($rsTowns);
if ($row_rsTowns) {
$newmainid = $row_rsTowns["Town_CountyID"];
}
if ($oldmainid != $newmainid) {
$n++;
}
}
echo "var rsTowns_WAJA = WAJA;\n";
echo "WAJA = null;\n";
echo "</SC" . "RIPT>\n";
}
function WA_DD_Replace($startStr) {
$startStr = str_replace("'", "|WA|", $startStr);
$startStr = str_replace("\\", "\\\\", $startStr);
$startStr = preg_replace("/[\r\n]{1,}/", " ", $startStr);
return $startStr;
}
?>
to line 96 so it is just before the doctype tag so you can apply the populate list from array behavior. Move it back to line 102 after the populate list from array behavior is applied.