0
Search by Artist ? HTML
Is there a way to search by Artist in this table in HTML. ?
The Code is
let vRaiting := "minRt: " + text('min. Raiting') + "| maxRt: " + text('max. Raiting');
let vRtMin := 'min. Raiting';
let vRtMax := 'max. Raiting';
let myObject := do as server
((select Albums) order by Name)['RYM Raiting' >= vRtMin]['RYM Raiting' <= vRtMax].{
nid: raw(Id),
name: Name,
title: Title,
tracks: Tracks,
rym: 'RYM Raiting',
type: text(Type),
format: text(Format),
brc: BarCode
}
end;
let filterResult := ((select Albums) order by Name);
let content := "
<style>
.grid-container {
display:grid;
/*hier kann die Spaltenanzahl festgelegt werden*/
grid-template-columns:repeat(auto-fill, minmax(20em, 1fr));
grid-gap:5px;
}
.gridFormat, .gridHeader, .gridHeader1{
font-size:large;
text-align:center;
border-radius:.5em;
padding:1em;
box-shadow:4px -4px 7px DimGray inset;
color:black;
}
.gridHeader {
grid-column: 1 / -4;
background:Silver;
font-size:x-large;
}
.gridHeader1 {
grid-column: 1 / -1;
background:Silver;
font-size:x-large;
}
.gridOne {background-color:#b0aac0;}
.gridTwo {background-color:#ddeedd;}
.gridThree {background-color:#c2d4dd;}
.gridFour {background-color:#AD5C62;color:black;}
table{
width:100%;
}
.tableFixHead {
overflow-y: auto;
height: 528px;
width: 1200px;
}
.right {
text-align: right
}
.center {
text-align: center
}
th {
font-size:small;
padding: .5em .5em .5em .5em;
border-radius: .5em .5em .5em .5em;
}
td{
font-size:small;
background-color: #ddeedd;
padding: .1em .5em .1em .5em;
text-align: center;
border-radius: .5em .5em .5em .5em;
}
button{
font-size:small;
background-color:#FAFAFA;color:black;
padding: .1em .5em .1em .5em;
text-align: center;
border-radius: .5em .5em .5em .5em;
}
thead,tfoot{
background-color:#ddeedd;
position: sticky;
font-size:small;
}
thead {
top: -.2em;
text-align:center;
}
tfoot{
bottom: -.2em;
}
tr:nth-child(odd) td{ /*ungerade Zeile einfärben*/
background-color: #b0aac0;
}
p {
visibility: hidden
}
</style>
<aside class = 'grid-container'>
<header class = 'gridFormat gridTwo gridHeader1'>
<div class='tableFixHead'>
<table>
<thead>
<tr>
<th> Artista </th>
<th> Album </th>
<th> Tracks </th>
<th> Raiting </th>
<th> Type </th>
<th> Format </th>
<th> Barcode </th>
<th> ➔ Go </th>
</tr>
</thead>
<tbody>";
let mitte := for i in myObject do
"<tr>
<td style=background-color:> " +
i.name +
" </td>
<td style=background-color: >" +
i.title +
" </td>
<td style=background-color: >" +
i.tracks +
" </td>
<td style=background-color: >" +
i.rym +
" </td>
<td style=background-color: >" +
i.text(type) +
" </td>
<td style=background-color: >" +
i.text(format) +
" </td>
<td style=background-color: >" +
i.brc +
" </td>
<td style=background-color:" +
---
border="" ">
<button onclick="ui.popupRecord('{ i.nid }')">{ "Album " }</button>
--- +
" </td>
</tr>"
end +
"</header>
</div>
<tfoot>
<tr>
<th style = text-align:center># " +
cnt((select Albums)['RYM Raiting' >= vRtMin]['RYM Raiting' <= vRtMax]) +
"</th>
<th style = text-align:left scope='colgroup' colspan='7' ><sub></sub> " +
"</th>
</tr>
</tfoot>
</div>
</body>
</html>
12 replies
-
Do you want to keep the search by Rating as well?
Do you want to the two searches linked or are they unique searches? Meaning, you can search either by Artist, or by Rating or both.
That is a pretty table. Maybe I should do more HTML work.
-
I think you can filter myObject like this...
myObject[name = "InsertYourAlbumNameHere"]
I created a myObject variable with one of my tables and filtered with that format and it worked.
You've got some CSS that isn't used in your code and filterResult was created and given a value, but isn't used.
Content aside
- Status Answered
- 1 yr agoLast active
- 12Replies
- 113Views
-
4
Following