var onprogress = false;

function startRequest()
{
  if(onprogress){
    return;
  }
  tfHasloText = document.getElementById('tfHaslo').value;
  if(tfHasloText == ""){
    alert("Proszę wprowadzić hasło.");
    return;
  }
  url = "http://localhost/dane.php?haslo=" + tfHasloText;
  url = encodeURI(url);

  var onprogress = true;
  startGETRequest(url, onComplete, onEnd);
}

function onComplete(text, xml)
{
  var dataDiv = document.getElementById('dataDiv');
  dataDiv.innerHTML = text;
}

function onEnd()
{
  var onprogress = false;
}