text: 
  
  
  
  
  
  
  
  window.onload = function()
          {
          	document.getElementById('sendButton').addEventListener('click', sendCredentials);
  
     //      	var attempt = 3; // Variable to count number of attempts.
  			// // Below function Executes on click of login button.
  			// function validate()
  			// {
  			// 	var username = document.getElementById("username").value;
  			// 	var password = document.getElementById("password").value;
  			// 	if ( username == "demo" && password == "demo")
  			// 	{
  			// 		alert ("Login successfully");
  			// 		window.location = "camunda.html"; // Redirecting to other page.
  			// 		return false;
  			// 	}
  			// 	else{
  			// 			attempt --;// Decrementing by one.
  			// 			alert("You have left "+attempt+" attempt;");
  			// 			// Disabling fields after 3 attempts.
  			// 			if( attempt == 0){
  			// 				document.getElementById("username").disabled = true;
  			// 				document.getElementById("password").disabled = true;
  			// 				document.getElementById("submit").disabled = true;
  			// 				return false;
  			// 			}
  			// 	}
  			// }
  
  
          	function sendCredentials(e)
          	{
          		e.preventDefault();
          		
                  var username = document.getElementById('username').value;
                  var password = document.getElementById('password').value;
                  var userInfo = "user="+username+"&pass="+password;
  
                  
  
                  var xhttp = new XMLHttpRequest();
                  xhttp.onreadystatechange = function()
                  { if(this.readyState == 4 && this.status == 200)
                      {
                          document.getElementById("demo").innerHTML = this.responseText;
                          
                      }
                  }
  
                  xhttp.open('POST', '././mail/login.php', true);
                  //xhttp.open('GET','././Camunda.html', true);
                  xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
                  xhttp.send(userInfo); 
          	}
  
  
  
  
          }