0
Optimize Popoup Windows
How can I optimize this Windows popup, Center and short Windows.
let myObject := do as server
((select Artists) order by Name).{
info: 'Info Artist'
}
end;
let css := "
<style>
table{
width:100%;
}
button{
font-size:small;
background-color:#CCFFCC;color:black;
padding: .1em .2em .1em .2em;
text-align: center;
border-radius: .2em .2em .2em .2em;
}
.modal {
display: none; /* Hidden by default */
position: fixed; /* Stay in place */
z-index: 1; /* Sit on top */
padding-top: 100px; /* Location of the box */
left: 0;
top: 0;
width: 100%; /* Full width */
overflow-y: auto; /* Enable scroll if needed */
background-color: rgb(0,0,0); /* Fallback color */
background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}
.modal-content {
background-color: #fefefe;
margin: auto;
padding: 20px;
border: 1px solid #888;
width: 80%;
}
/* The Close Button */
.close {
color: #aaaaaa;
float: right;
font-size: 18px;
font-weight: bold;
}
.close:hover,
.close:focus {
color: #000;
text-decoration: none;
cursor: pointer;
}
</style>
";
let content := "
</head>
<body>
<!-- Trigger/Open The Modal -->
<button id='myBtn'> Artist Info </button>
<!-- The Modal -->
<div id='myModal' class='modal'>
<!-- Modal content -->
<div class='modal-content'>
<span class='close'>×</span>
<table ><thead>
<tr>
<th> Info Artist </th>
</tr>
</thead><tbody>";
let mitte := for i in myObject do
"<tr>
<td style=background-color:> " +
i.info +
" </td>
</tr>"
end +
"</header>
</div>
</div>
<script>
var modal = document.getElementById('myModal');
var btn = document.getElementById('myBtn');
var span = document.getElementsByClassName('close')[0];
btn.onclick = function() {
modal.style.display = 'block';
}
// When the user clicks on <span> (x), close the modal
span.onclick = function() {
modal.style.display = 'none';
}
// When the user clicks anywhere outside of the modal, close it
window.onclick = function(event) {
if (event.target == modal) {
modal.style.display = 'none';
}
}
</script>
</body>
</html>
5 Antworten
-
Hi Rafael, I would need a sample db please to try to help. :-)
Saludos
Content aside
- vor 1 JahrZuletzt aktiv
- 5Antworten
- 77Ansichten
-
2
Folge bereits