POST TEST (ITEM)
<i id="pass-status" class="fa fa-eye field-icon" aria-hidden="trun" onClick="viewPassword()"></i>
Function and Global Variable Declaration (Page)
function viewPassword()
{
var passwordInput = document.getElementById('P101_PASSWORD');
var passStatus = document.getElementById('pass-status');
if (passwordInput.type == 'password'){
passwordInput.type='text';
passStatus.className='fa fa-eye-slash field-icon';
}
else{
passwordInput.type = 'password';
passStatus.className='fa fa-eye field-icon';
}
}
Inline (Page)
.field-icon{
float: right;
margin-left: -25px;
margin-top: 11px;
position: relative;
z-index: 2;
}