src/public/js/edit_profile.js
/**
 * If there was an error uploading your profile picture displays the message on the front end.
 */
If there was an error uploading your profile picture displays the message on the front end.
If there was an error uploading your profile picture displays the message on the front end .
function check_for_errors()
{
    const queryString = window.location.search;
    const urlParams = new URLSearchParams(queryString);
    const error_message = urlParams.get('err');
    if(error_message !== null)
    {
        document.getElementById("picture_err_message").style.display = 'block';
    }
    else
    {
        document.getElementById("picture_err_message").style.display = 'none';
    }
    document.getElementById("picture_err_message").innerText = error_message;
}
function check_for_errors ( ) { const queryString = window . location . search ; const urlParams = new URLSearchParams ( queryString ) ; const error_message = urlParams . get ( 'err' ) ; if ( error_message !== null ) { document . getElementById ( "picture_err_message" ) . style . display = 'block' ; } else { document . getElementById ( "picture_err_message" ) . style . display = 'none' ; } document . getElementById ( "picture_err_message" ) . innerText = error_message ; }
If there was an error uploading your profile picture displays the message on the front end.
If there was an error uploading your profile picture displays the message on the front end .