我想允许用户为一个元数据选择多个选项,我们需要提供相同的复选框。我已经修改了相应的包含并添加了 java 脚本,但是有些值没有分配给元数据:我已经修改了包含并添加了 JS 如下,但是元数据没有被分配到选定的值,谁能告诉我我哪里出错了:
<script type="text/javascript">
function getSelected(Language) {
var selected = new Array();
var index = 0; for (var intLoop=0; intLoop < Language.length; intLoop++) {
if (Language[intLoop].selected) { index = selected.length;
selected[index] = new Object;
selected[index].value = Language[intLoop].value;
selected[index].index = intLoop; } }
return selected;
}
function submit(selected)
{
var value =selected;
xTranslateTo = value;
}
</script>
<$if strEquals(fieldName, "xTranslateTo") and not (isInfo or isQuery)$>
<tr <$strTrimWs(inc("std_nameentry_row_attributes"))$>>
<td <$if captionFieldWidth$>width="<$captionFieldWidth$>"<$endif$> <$if isInfo$>align=right<$endif$>><$strTrimWs(inc(fieldCaptionInclude))$></td>
<td <$if isFieldInfoOnly$>colspan="100"<$endif$> <$if captionEntryWidth$>;width="<$captionEntryWidth$>"<$endif$>><$inc(fieldEntryInclude)$>
<INPUT TYPE=CHECKBOX NAME="Language" VALUE="English">English
<INPUT TYPE=CHECKBOX NAME="Language" VALUE="Italian">Italian
<INPUT TYPE=CHECKBOX NAME="Language" VALUE="French">French
<INPUT TYPE=CHECKBOX NAME="Language" VALUE="German" >German</td>
</tr>
<a href="javascript:;" onclick=" getSelected()">
<$else$>
<$include super.std_nameentry_row$>
<$endif$>
任何人都可以阐明我哪里出错了