0
HTML and Ninox
So I'm trying to understand the difference between using double quotes ( " ) and --- when creating HTML code.
I have the following code:
let tbleHead := "
<thead class='tableFixHead'>
<tr>
<th>Name</td>
<th>" +
if League = 2 then "R1Atm" else "Atm" end +
"</th>
" +
if League != 2 then "<th>AvP</th>" end +
"
</tr>
</thead>";
This creates the third table header properly.
But if I use the three dashes:
let tbleHead2 := ---
<thead>
<tr>
<th>Name</th>
<th>Atm</th>{ if League != 2 then "<th>AvP</th>" end }
</tr>
</thead>
---;
I get undefined.
I can't figure out to escape back to Ninox when using three dashes.
Thanks,
6 replies
-
So when you use three dashes you can access field names by using curly brackets: { }. But these don't work if you want to escape out to Ninox to run commands.
-
Try this, but i do not know if that is this, what you need. Mirko
let tbleHead2 := --- <thead> <tr><th>Name</th>{ if lastPr != 2 then "<th>Atm</th><th>AvP</th>" else "<th>R1</th><th>Atm</th>" end }</tr> </thead> ---; html(tbleHead2)
-
Hi Fred. Sorry if I should mistranslate some things. The sequence for the table header can also be swapped to a variable. This makes it a little clearer again.
let head := if League != 2 then "<th>Name</th><th>Atm</th><th>AvR</th>" else "<th>Name</th><th>Atm</th>" end; let tbleHead2 := --- <thead> <tr>{ head }</tr> </thead> ---; html(tbleHead2)
Content aside
- Status Answered
- 2 wk agoLast active
- 6Replies
- 72Views
-
2
Following