title: How to read a variable from a AJAX response string that is inside a <script> tag?
body: <p>I have a AJAX request that will return a string that contains some HTML code:</p>
  
  <p>The returned value is a very big string, like this:</p>
  
  <pre><code>&lt;/div&gt;&lt;/div&gt;
  &lt;script type="text/javascript"&gt;
      var bld=[{"stufe":7,"gid":"4","aid":"18"}]
  &lt;/script&gt;
  &lt;div id="map_details"&gt;&lt; div class="movements"&gt;...
  </code></pre>
  
  <p>The only part I need is the variable <code>bld</code> inside that <code>&lt;script&gt;</code> tag.</p>
  
  <p>I use jQuery in my script, but, since it <code>evals</code> every single piece of <code>&lt;script&gt;</code> code inside the ajax response, I had to use another AJAX method to return the complete string with the <code>&lt;script&gt;</code> tag on it...</p>
  
  <p>I think this could have 2 solutions:</p>
  
  <ol>
  <li><p>If the jQuery AJAX function <code>evals</code> the script code inside the html response, how could I access the value of that variable? </p>
  
  <p>I have already tried but the variable <code>bld</code> is undefined in the <code>ajax.success</code> function. </p></li>
  <li><p>Is there a way to use javascript or jquery to get the variable that is inside that <code>&lt; script&gt;</code> tag when I have that value in an html string?</p></li>
  </ol>