A
amy
I have a text box, after user input the value, a validate function
trigered. if the value is invalid, alert display, and also set focus
back to this control.
The alert displays, but when the click the 'OK' in the alert, the set
focus to this field does not work.
see the code bellow:
if (run!="" && IsNumber(run)==false && decimalinputvalid(run,2)==0 )
{
alert('wow');
//first try doen not working
(setFocus) ? document.papercaltbl.printorder.focus() : ""
//seconde try doen not working
this.getField("printorder").setFocus();
//third try doen not working
document.getElementById("printorder").focus();
}
Please give some advise. Thanks in advance.
trigered. if the value is invalid, alert display, and also set focus
back to this control.
The alert displays, but when the click the 'OK' in the alert, the set
focus to this field does not work.
see the code bellow:
if (run!="" && IsNumber(run)==false && decimalinputvalid(run,2)==0 )
{
alert('wow');
//first try doen not working
(setFocus) ? document.papercaltbl.printorder.focus() : ""
//seconde try doen not working
this.getField("printorder").setFocus();
//third try doen not working
document.getElementById("printorder").focus();
}
Please give some advise. Thanks in advance.