Javascript modal

The following example loads a content from a remote URL and defines basic events to the modal




<html>
<script src="https://bossanova.uk/jsuites/v3/jsuites.js"></script>
<link rel="stylesheet" href="https://bossanova.uk/jsuites/v3/jsuites.css" type="text/css" />

<div id='modal' title='Remote content'></div>

<input type='button' value='Click here to open the modal' onclick='modal.open()' class='plain'>

<script>
var modal = jSuites.modal(document.getElementById('modal'), {
    url: '/jsuites/content',
    width:'600px',
    height:'480px',
    closed:true,
    onclose:function() {
        console.log('Modal is closed');
    },
    onopen:function() {
        console.log('Modal is opened');
    },
});
</script>
</html>