Domino 9 und frühere Versionen > Entwicklung

How can I make a table on the web ?

(1/2) > >>

Toma Bogdan:
I want to make a table on the web; also I need 2 buttons (ADD & REMOVE) which need to add and remove items from this table. how can I make this on the web (type of fields, some JS or LS code for actions) ?
thanks

wflamme:
A simple solution which might work for you:
You can have each row's contents as a seperate document. Then you can use the 'single category view' feature to display the <tr> ...</tr> stuff as embedded HTML view. The table header/footer goes into the form/page that holds the embedded view.

Adding/deleting/editing will then simply apply to the row documents using regular URL syntax.

Toma Bogdan:
this was also my ideea but I don't want to create docs for each line .... maybe there is another solution  ::)

harkpabst_meliantrop:
I'm afraid, that no other solution will be as clean, elegant and straigth forward.

For a single cell per row, you could populate a multi-value field (which transforms into a text area in the browser) and write the outer tags of a table in pass-through-HTML.  The rows and cells could be calculated by some computed text acording to that field, i.e.:

<br>
<table border="1">
  <tr>
    <td>
    <Computed Value>
    </td>
  </tr>
</table>

as pass-through-HTML and the computed text being calculated to

@Implode(Content + "[</td></tr><tr><td>]")

where Content is the name of the mult-value input field.

However, this will be hardly manageable with more complex table structures and even im my small example I always have one empty row at the bottom of my table. It's probably possible to avoid that as well, but as I said: Not clean, not elegant, not straight forward.


harkpabst_meliantrop:
O.K., just in case: It works better this way:


<table border="1">
    <Computed Value>
</table>

where Computed Value is

@Implode("[<tr><td>]" + Content + "[</td></tr>]")


Still not brilliant.

Navigation

[0] Themen-Index

[#] Nächste Seite

Zur normalen Ansicht wechseln