Hi,
I am building a custom field using multiple select list and use java script to hide some options from some particular group. My current javascript is
<script type="text/javascript">
targetCategory = document.getElementById('customfield_10102');
conditionField = document.getElementById('Reporter');
subCategoryOptionsCount = document.getElementById('customfield_10102').length;
tempVar = 0;
if (conditionField=="admin")
{
while(tempVar < subCategoryOptionsCount)
{
if(targetCategory.options[tempVar].text=="VIC" )
{
targetCategory.remove(tempVar);
subCategoryOptionsCount--;
}
tempVar++;
}
}
</script>
But this doesn't work, I am pretty sure I am messed up in conditionField. Can anyone help?
Thanks,
Tuan