title: codeIgniter Javascript alert with success message on click ok page refresh
body: <p>I have a code like this:</p>
  
  <pre><code>&lt;div class="alert alert-success"&gt;
      &lt;a class="close" data-dismiss="alert"&gt;×&lt;/a&gt;
      &lt;?php 
  
          $message = "Your Upload was successful";
          if((isset($message))&amp;&amp;($message!='')){
          echo '&lt;script&gt; alert("'.str_replace(array("\r","\n"), '', $message).'");      &lt;/script&gt;';
          }
         redirect($this-&gt;uri-&gt;uri_string());  //refresh page
      ?&gt;
  </code></pre>
  
  <p>I want to show this success alert message and then if the user click on OK it will refresh the browser. In my case it is just refreshing the browser.</p>
  
  <p>What will be the best way to do it.</p>
  
  <p>Thanks a lot in advance.</p>