i posted this thread in the firefox bugs' forum believing that the following content is a bug. so, nobody had replied. i found a script that someone said that it don't work in firefox, don't know which version, but however, it don't work to me either. my version is 1.5.0.1 and i was debuging the script and i have noticed something curious. first, this was the code that someone provided:
Code: Select all
<html><head><title>Test</title>
<script>
function Check () {
if(document.getElementById('valor1').value>10){
alert("El valor es de tiene que ser menor de 10");
document.form1.valor1.focus();
}
}
</script>
</head><body>
<form>
cual es tu puntuación?<br>
<input>
</form>
</body></html>
if you got the tabbed windows functionality you will perceive the following behavior. test the code and you will notice that after the alert function, the focus statement seem not to take action (by the way, this happen either the tabbed windows functionality is avaible or not, but keep reading). after you click 'OK' button from alert function, hit any alphanumeric key to prove that the focus action is not executed. after that, change the tab window and go back to the initial tab and you will notice that the focus funcion take action. this is the first behavior that i indentify as bug.
the other behavior is using the same script but changing to the statement's order as follow:
Code: Select all
<script>
function Check () {
if(document.getElementById('valor1').value>10){
document.form1.valor1.focus();
alert("El valor es de tiene que ser menor de 10");
}
}
</script>
in this behavior you will notice that the function keep looping without displaying the alert message. is like the alert function cause a blur event after the focus action but the message alert is canceled due to the onblur event of the field and keep in that cycle.
i know that i'm including javascript code and hence this thread maybe should be posted in the Web Development / Standard Evangelism forum's section, but i consider those behaviors as bugs. I'm a bit lazy and busy to look in the forum for similar thread. but if someone know a similar thread, please let me know where i can find the thread and ignore this thread.
thanks for reading this thread and any comment is welcome
pd: sorry for my english, isn't my native language