the following part of code is from a pop-up alert window, in the example page on how to use there is a button that says "Error", and when you click it the window appears.
<button class="btn btn-danger notification" data-verti-pos="bottom" data-horiz- pos="right" data-message="<i class='fa fa-frown-o' style='padding-right:6px'></i> Oops... Something went wrong. Hope we don\'t see me again." data-type="error" type="button"></button>
The problem is that i want to call the window without needing to click the button, i am trying to call it inside this if conditional.
if(codigo=="matricula_longitud"){
//I know the part of code below is totally wrong
document.getElementById("errores").innerHTML='<div class="alert alert-warning fade in"><button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button><strong>Warning!</strong> Better check yourself, youre not looking too good.</div>';
return "si";
}
I am new to programming so any advice will be appreciated. Thank you.