I have a javascript function that using to set focus to a text box after
clicking a button (butSearch) which is called in Page_Load
**********************************************
dim jsscript as string
jsscript = jsscript + " document.getElementById('txt_S_ItemCode').focus(); "
jsscript = jsscript + " { alert('Please input item barcode.'); return
false; }"
butSearch.Attributes.Add("onclick", jsscript)
**********************************************
The function worked. However, once in awhile the function failed to focus on
back to the textbox. I think there's around 1 time per every 10 trails. Do
you guys have any idea about how to fix it ?