Oh dear me yes ... a javascript problem ....
I believe the error lies in this code - line 321 - :
Code:
echo '<td><input class="number" type="text" name="GLManualCode" maxlength="12" size="12" onChange="inArray(this.value, GLCode.options,'. "'".'The account code '."'".'+ this.value+ '."'".' doesnt exist'."'".')" value="'. $_POST['GLManualCode'] .'" /></td>';
$sql="SELECT accountcode,
accountname
FROM chartmaster
ORDER BY accountcode";
$result=DB_query($sql, $db);
echo '<td><select name="GLCode" onChange="return assignComboToInput(this,'.'GLManualCode'.')">';
echo '<option value="">' . _('Select a general ledger account code') . '</option>';
while ($myrow=DB_fetch_array($result)){
if (isset($_POST['tag']) and $_POST['tag']==$myrow['accountcode']){
echo '<option selected="selected" value="' . $myrow['accountcode'] . '">' . $myrow['accountcode'].' - ' .htmlentities($myrow['accountname'], ENT_QUOTES,'UTF-8') . '</option>';
} else {
echo '<option value="' . $myrow['accountcode'] . '">' . $myrow['accountcode'].' - ' .htmlentities($myrow['accountname'], ENT_QUOTES,'UTF-8') .'</option>';
}
}
echo '</select></td>';
Needs a javascript person to figure out if GLCode.options will return the array of options from the GLCode select box. It seems it doesn't