title: How many characters allowed in an alert box in JavaScript
body: <p>Does anyone know what is the maximum number of characters you can display in an alert box?</p>
  <p>I'm returning an error alert to the user with details for each of the errors and warnings but apparently the box just don't show up anymore when there is too much data. Here's some of my code:</p>
  <pre><code>&lt;?php
      //Two arrays are created in php, one with the errors, one with the warnings.
  ?&gt;
  
  &lt;script type=&quot;text/javascript&quot;&gt;
      alert(&quot;&lt;?php
           if(count($err) != 0){
               $errorfound = True;
               echo 'Error:\n\n';
               foreach($err as $message){
                   echo '\t' . $message . '\n';
               }
           }
           if(count($warn) != 0){
               echo '\n\nWarning:\n\n';
               foreach($warn as $mess){
                   echo '\t' . $mess . '\n';
               }
          }?&gt;&quot;);
  &lt;/script&gt;
  
  &lt;?php
      //app continues if no error was found
  ?&gt;
  </code></pre>
  <p>After investigation, my problem didn't come from the capacity of the alert box but was in fact that I needed to <code>addslashes()</code> to my messages (that's why I thought it was working with fewer values, but in fact I was just lucky because they weren't characters that needed to be escaped).
  I'll definitely change that alert box for something more appropriated, just wanted to say that there is no problem with the alert box.</p>