I am trying to get the focus on an object if a condition occurs. Here is the code I am using. It will get the element.value right, but it doesn't focus on the element once the function exits.
function trigger(type,trigger,message, element)
{
switch (type)
{
case "number":
if (!isFloat(element.value))
{
window.alert(message);
element.focus();
}
break;
default:
document.alert("Fell through to default."
;
}
}
Ace21
function trigger(type,trigger,message, element)
{
switch (type)
{
case "number":
if (!isFloat(element.value))
{
window.alert(message);
element.focus();
}
break;
default:
document.alert("Fell through to default."

}
}
Ace21