-1

I have a SendMail button which on click calls the JavaScript function. Which upon validating gives the alert message. But that is a default alert which I am using. How can I create a customised alert in JavaScript.

My HTML Code:

       <div id ="sendmail" style="display: none;">
        <div class="container">
        <div style="text-align:right; width:100%; padding:0;">
        <button id ="cancel" style='margin-right:16px' class="btn btnprimary btn-lg pull-right" a href="javascript:window.history.back()">Cancel</button>
        <button id ="sendMail" style='margin-right:16px'  class="btn btn-primary btn-lg pull-right" onclick="sendMail()">SendMail</button>

And this is my index.js file

        function sendMail(){
        console.log(employee_id);
        var employeeid = employee_id;
$.ajax({
  url:'http://localhost:8088/JirasTrackingApp/reporter/
  Reportees/JiraNames/'+employeeid,
    type:'GET',

    success: function(Jiranumbers){
             alert("Mail is sent successfully");  //here I need to be able to call the customized alert instead of that default alert
            },
      error: function(Jiranumbers){
            alert("Mail is not sent successfully");
        }        
    });

Please advice, Thanks.

Sumithran
  • 6,217
  • 4
  • 40
  • 54
Ramya
  • 49
  • 6

1 Answers1

1

Your question very similar to this and I know you got your answer in this query. how to change the style of alert box