title: how to execute a javascript function returned from ajax response
body: <p>I have a function which i want to execute when ajax makes a successful request but it doesn't execute here my jquery part</p>
  
  <pre><code>$.ajax({  
      type: "POST",  
       url: "https://www.example.com/create_chat.php",  
       data: dataString,
          beforeSend: function() 
              {
                  $("#loading_indicator").show();
              },  
          success: function(response)
              {
                  $(".example").html(response);
  
              }
          }); 
  </code></pre>
  
  <p>here is the response from php file</p>
  
  <pre><code>&lt;script&gt;start_chat(); alert("testing");&lt;/script&gt;
  </code></pre>
  
  <p>i tried adding this also</p>
  
  <pre><code>$(".example").find("script").each(function(i) {
  eval($(this).text());
  });
  </code></pre>
  
  <p>but nothing works</p>