js-modalalert

Alternative to the standard JavaScript alert method.

Tutorial

Sample Parameters in Method Call

onclick="showAlert('Alert Title', 'This is the body of the alert.', 'Close Button', 1)"

Returning Information

The method getAlertContents() iterates though the information input by the user and stores it in an array. The array alertInfo is a global variable for easy access for sending to a server or for further processing. The elements are stored in the array in the same order that they appear on the modal alert window.


function getAlertContents(){
    for(j = 0; j < buttonValue.length; j++){
        var el = document.getElementById('alertForm'+j).value;
        alertInfo.push(el);
    }
}

Advantages

Disadvantages

Planned Implementation