My code is
function getID( swfID ){
if(navigator.appName.indexOf("Microsoft") != -1){
me = window[swfID];
}else{
me = document[swfID];
}
}
function js_to_as( str ){
me.onChange(str);
}
However, sometimes my onChange does not load. Firebug errors with
me.onChange is not a function
I want to degrade gracefully because this is not the most important feature in my program. typeof gives the same error.
Any suggestions on how to make sure that it exists and then only execute onChange?
(None of the methods below except try catch one work)
Nesta página do site você pode assistir ao vídeo on-line How to check if function exists in JavaScript? duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Code Samples 03 Abril 2024, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 17 vezes e gostou 0 espectadores. Boa visualização!