O document.getElementById funciona no IE7 mas não no Firefox
Tenho a função abaixo na minha página e esta funciona no IE7 mas não funciona no Firefox.
Dá erro na linha "son = father.document.getElementById(newIdObjectSon);" com erro "father.document is undefined";
Alguém sabe me dizer o que pode ser?
-------------------------------------------------------------
function f_getObjectSon(newIdObjectFather , newIdObjectSon) {
var father = document.getElementById(newIdObjectFather);
var son;
if (father) {
son = father.document.getElementById(newIdObjectSon);
}
else {
alert('Father not found: '+newIdObjectFather);
}
return son;
}
-------------------------------------------------------------
Discussão (5)
Carregando comentários...