How to add dialog box in bootstrap?

Share Me
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

Today now in this post i will show you How to add dialog box in bootstrap? Some times We need to dialog box in our project because modal is a very interesting and also very specially for GUI. Always we as like to use modal for as creating data or editing data and also for conformation. So if we think how to set a modal in our project then it is a very easy we have to just need to copy the bellow example and need to run in our local and we will find the result. Now in this example i will provide you a bootstrap modal example also with code so it pretty simple to use.

Example:

<html lang="en">
<head>
	<title>Bootstrap modal popup example</title>  
    <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet">
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>  
</head>
<body>


<a href="#myDemoModal" role="button" class="btn btn-large btn-success" data-toggle="modal">Promote Demo Modal</a>
<!-- Modal HTML -->
<div id="myDemoModal" class="modal fade">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title">I am from Itsolutionstuff.com</h4>
            </div>
            <div class="modal-body">
                <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
                tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
                quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
                consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
                cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
                proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                <button type="button" class="btn btn-success">I Read</button>
            </div>
        </div>
    </div>
</div>
<!-- Modal HTML End -->


</body>
</html>

Read Also: How to create and use Middleware in Laravel?

I hope it can help you to learn laravel 6 crud operation. Also you can follow us on Facebook

About code chef

My name is Shahriar sagor. I'm a developer. I live in Bangladesh and I love to write tutorials and tips that will help to other Developer's. I am a big fan of PHP, Javascript, JQuery, Laravel, Codeigniter, VueJS, AngularJS and Bootstrap from the early stage.

View all posts by code chef →