Help!
I have a clickable map. when I click on the different areas the areas are added into a list box. Now I am trying to avoid duplicate values in the list box. This is my javascript to add values into the list box. Can somebody tell me how to avoid duplicate values in this list box with this script.
function copyItem(name)
{
var newOpt = new Option();
newOpt.value = name;
newOpt.text = name;
var n = document.mainForm.select1.length;
document.mainForm.select1.options[n] = newOpt;
}
Thanks for any help.
greygirl
I have a clickable map. when I click on the different areas the areas are added into a list box. Now I am trying to avoid duplicate values in the list box. This is my javascript to add values into the list box. Can somebody tell me how to avoid duplicate values in this list box with this script.
function copyItem(name)
{
var newOpt = new Option();
newOpt.value = name;
newOpt.text = name;
var n = document.mainForm.select1.length;
document.mainForm.select1.options[n] = newOpt;
}
Thanks for any help.
greygirl