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...