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.d ocument.getElem entById('myform ');
var num_of_elem = form_obj.childr en.length;
var count;
for (count = 0; count<num_of_el em;count++)
{
var name = form_obj.childr en[count].name;
if (name.match(/^keywords.*/))
{
form_obj.childr en[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.d ocument.getElem entById('myform ');
var num_of_elem = form_obj.childr en.length;
var count;
for (count = 0; count<num_of_el em;count++)
{
var name = form_obj.childr en[count].name;
if (name.match(/^keywords.*/))
{
form_obj.childr en[count].removeNode();
}
}
}
Comment