Javascript closing alert message box

         setTimeOut(function() {

             $("#alertdialog").dialog("close")

         }, 5000);

What exactly is your question?

javascript code to close alert box after displaying for a few seconds