Read the statement by Michael Teeuw here.
Develop module with API
-
@htilburgs
Insert “tr” element after each row. -
Don’t I do this with this?
var callWrapper = document.createElement("tr"); callWrapper.appendChild(FajrTextCell);
-
@htilburgs yes, for each row, and the columns added to the row
-
@sdetweil I don’t understand what you mean.
-
@htilburgs make a table with HTML.
tr have to be added to table for each row
And td need to be added for each trRight? Exactly the same using code
-
@htilburgs
https://www.w3schools.com/jsref/dom_obj_table.asp
This might be help. Read following articles about table on that site. -
@Sean @sdetweil I finaly figured it out! Thanx for the support and pointing me in the correct direction. See the result:
var MPT = this.MPT; // creating the tablerows // Fajr var FajrRow = document.createElement("tr") FajrRow.className = "small fajr-row"; var FajrTextCell = document.createElement("td"); FajrTextCell.innerHTML = "Fajr"; FajrRow.appendChild(FajrTextCell); table.appendChild(FajrRow); var FajrTimeCell = document.createElement("td"); FajrTimeCell.className = "bright"; FajrTimeCell.innerHTML = MPT.Fajr; FajrRow.appendChild(FajrTimeCell); table.appendChild(FajrRow); var FajrArabCell = document.createElement("td"); FajrArabCell.innerHTML = "الفجر"; FajrRow.appendChild(FajrArabCell); table.appendChild(FajrRow); ...... } return table;
-
Fabulous! Nice work!
-
@Mykle1 Thanks for the MMM-UFO “templates”. This really helped me to get started.
First one down, several to go…:winking_face: -
You’re welcome, mate. And with @sdetweil and @Sean you found the best help possible. :thumbsup: