title: jquery.get() - problem using data as global variables
body: <p>Well, I've read a lot in the Net, bust still haven't found a solution to my problem:
  I need to check if the content of a file is "nok" or empty ("") using the jquery method get. One of the things I tried (didn't work of course, but shows clearly my idea) is:  </p>
  
  <pre><code>$(document).ready(function(){
  $("#submit").click(function(){
  ...
  var captchacheck="";
  $.get("/form.php", function(data){captchacheck=data;}));
  if(captchacheck == "nok") hasError=true;
  ...
  </code></pre>
  
  <p>So please tell me how really to store the string from data into a global variable (or another suitable structure) so that the plain text nok could be used in if-clauses.</p>