Want to change out alert box for modal


I have a js script that validates the input on a form.

<form name=“Form1” onsubmit=“return Validate_AddUser();” action=“#” method=“post”>

This script checks to see if the fields were completed. for example:
alert (“User Number is a required field.”);

I would like to swap the alert box out for a modal box, but not sure how I would do this.

Any help would be appreciated.


Here is how to obtain instructions on creating javascript modal dialog boxes.