O
Ole Noerskov
The function below is supposed to remove all childnodes with a name
that starts with "keywords" in "myform" in the window.opener.
It works fine if there's one keyword node. But you have to run the
function several times if there are many keyword nodes.
Why?
function removeKeywords()
{
var form_obj = window.opener.document.getElementById('myform');
var num_of_elem = form_obj.children.length;
var count;
for (count = 0; count<num_of_elem;count++)
{
var name = form_obj.children[count].name;
if (name.match(/^keywords.*/))
{
form_obj.children[count].removeNode();
}
}
}
that starts with "keywords" in "myform" in the window.opener.
It works fine if there's one keyword node. But you have to run the
function several times if there are many keyword nodes.
Why?
function removeKeywords()
{
var form_obj = window.opener.document.getElementById('myform');
var num_of_elem = form_obj.children.length;
var count;
for (count = 0; count<num_of_elem;count++)
{
var name = form_obj.children[count].name;
if (name.match(/^keywords.*/))
{
form_obj.children[count].removeNode();
}
}
}