function generateConfirmDialog(userLocation) {
    var confirmSpan = document.getElementsByClassName("close")[2];
    var inviteConfirm = document.getElementById('inviteConfirm');
    var inviteDeny = document.getElementById('inviteDeny');
    var confUserName = document.getElementById('confUserName');
    var inviteInfo = document.getElementById('inviteInfo');
    userInput = document.getElementById('userNameInp');

    //console.log(userLocation);
    //console.log(userArr[userLocation].userName);
    if (userLocation != -1) {
      confUserName.innerHTML = "Did you mean to add \"" + userArr[userLocation].name + "\"?";
      userInviteModal.style.display = "none";
      confirmUserModal.style.display = "block";

      inviteConfirm.onclick = function () {
        inviteUserDB(userArr[userLocation]);
        confirmUserModal.style.display = "none";
        userInput.value = "";
        inviteInfo.innerHTML = "";
      };

      inviteDeny.onclick = function () {
        confirmUserModal.style.display = "none";
        userInviteModal.style.display = "block";
        userInput.value = "";
        inviteInfo.innerHTML = "";
      };

      //close on close
      confirmSpan.onclick = function () {
        confirmUserModal.style.display = "none";
        userInput.value = "";
        inviteInfo.innerHTML = "";
      };

      //close on click
      window.onclick = function (event) {
        if (event.target == confirmUserModal) {
          confirmUserModal.style.display = "none";
          userInput.value = "";
          inviteInfo.innerHTML = "";
        }
      }
    } else {
      alert("Error finding user, please contact the developer for assistance!");
    }
  }
//This function generates the confirm dialog to confirm a user's invitation to view their list
This function generates the confirm dialog to confirm a user's invitation to view their list
This function generates the confirm dialog to confirm a user ' s invitation to view their list
function generateConfirmDialog(userLocation) {
    var confirmSpan = document.getElementsByClassName("close")[2];
    var inviteConfirm = document.getElementById('inviteConfirm');
    var inviteDeny = document.getElementById('inviteDeny');
    var confUserName = document.getElementById('confUserName');
    var inviteInfo = document.getElementById('inviteInfo');
    userInput = document.getElementById('userNameInp');
    if (userLocation != -1) {
      confUserName.innerHTML = "Did you mean to add \"" + userArr[userLocation].name + "\"?";
      userInviteModal.style.display = "none";
      confirmUserModal.style.display = "block";
      inviteConfirm.onclick = function () {
        inviteUserDB(userArr[userLocation]);
        confirmUserModal.style.display = "none";
        userInput.value = "";
        inviteInfo.innerHTML = "";
      };
      inviteDeny.onclick = function () {
        confirmUserModal.style.display = "none";
        userInviteModal.style.display = "block";
        userInput.value = "";
        inviteInfo.innerHTML = "";
      };
      confirmSpan.onclick = function () {
        confirmUserModal.style.display = "none";
        userInput.value = "";
        inviteInfo.innerHTML = "";
      };
      window.onclick = function (event) {
        if (event.target == confirmUserModal) {
          confirmUserModal.style.display = "none";
          userInput.value = "";
          inviteInfo.innerHTML = "";
        }
      }
    } else {
      alert("Error finding user, please contact the developer for assistance!");
    }
  }
function generateConfirmDialog ( userLocation ) { var confirmSpan = document . getElementsByClassName ( "close" ) [ 2 ] ; var inviteConfirm = document . getElementById ( 'inviteConfirm' ) ; var inviteDeny = document . getElementById ( 'inviteDeny' ) ; var confUserName = document . getElementById ( 'confUserName' ) ; var inviteInfo = document . getElementById ( 'inviteInfo' ) ; userInput = document . getElementById ( 'userNameInp' ) ; if ( userLocation != - 1 ) { confUserName . innerHTML = "Did you mean to add \"" + userArr [ userLocation ] . name + "\"?" ; userInviteModal . style . display = "none" ; confirmUserModal . style . display = "block" ; inviteConfirm . onclick = function ( ) { inviteUserDB ( userArr [ userLocation ] ) ; confirmUserModal . style . display = "none" ; userInput . value = "" ; inviteInfo . innerHTML = "" ; } ; inviteDeny . onclick = function ( ) { confirmUserModal . style . display = "none" ; userInviteModal . style . display = "block" ; userInput . value = "" ; inviteInfo . innerHTML = "" ; } ; confirmSpan . onclick = function ( ) { confirmUserModal . style . display = "none" ; userInput . value = "" ; inviteInfo . innerHTML = "" ; } ; window . onclick = function ( event ) { if ( event . target == confirmUserModal ) { confirmUserModal . style . display = "none" ; userInput . value = "" ; inviteInfo . innerHTML = "" ; } } } else { alert ( "Error finding user, please contact the developer for assistance!" ) ; } }
This function generates the confirm dialog to confirm a user's invitation to view their list
This function generates the confirm dialog to confirm a user ' s invitation to view their list
//console.log(userLocation); //console.log(userArr[userLocation].userName); //close on close //close on click