I want to test my extjs form. When the text field is empty, a warning window should be displayed, after which our cursor should focus on the text field. I tried with the encoding below. Alert is working fine. but the cursor does not focus. Could you help me all concentrate?
if(Ext.get('first').dom.value=='') { Ext.MessageBox.alert('Status', 'Enter your First Name!'); document.getElementById("first").focus(); }
Abisha
source share