// empty Topics select list content
function clearTopicList(select) {
while (select.length > 0) {
select.remove(select.length-1);
}
}
// add item to select element the less
// elegant, but compatible way.
function appendToSelect(select, value, content) {
var opt;
//opt = document.createElement("option");
opt = window.opener.document.createElement("option");
opt.value = value;
//var theData = document.createTextNode(content);
var theData = window.opener.document.createTextNode(content);
opt.appendChild(theData);
select.appendChild(opt);
}
clearTopicList(window.opener.document.reg.your_field);
appendToSelect(window.opener.document.
your_form .your_field ,"your_value","your_text");
沒有留言:
張貼留言