Does anyone know how can I make a sleep in javascript before next line been read by the system?
example:
1 var chkResult = Validation(); 2 /
The delay won't happen until JavaScript has relinquished control back to the browser, so your line 4 will execute before the setTimeout starts.
You should be making everything happen based on events.