How can I place a HTML table behind the PlayCanvas content/applet part?.. trying by z-index, a bit like this https://www.w3schools.com/cssref/pr_pos_z-index.asp
Why does it need to be behind? Can it be hidden (display: none) instead? Does it need to be in a HTML table?
By using a JS window-script like this I can access certain
window.handleTable = function() {
var table = document.getElementById('tableId');
var items = table.getElementsByClassName("point");
console.log("items.length... " + items.length);
var sum = 0; var tmp =0;
for(var i=0; i<items.length; i++){
tmp =items[i].value;
// console.log("tmp: " + tmp);
sum += parseInt(items[i].value);
// console.log("sum: " + sum);
}
var sumk = 0; var sumkk = 0; var tmpk =0; var tmpkk =0;
var itemsAlt2 = table.getElementsByTagName('input');
for(var k=0; k<itemsAlt2.length; k++){
tmpk =parseInt(itemsAlt2[k].value)+0;
if(tmpk>900000){
//d.enabled = false;
tmpkk =parseInt(itemsAlt2[k].value)+0;
console.log("tmpUF: " + tmpkk); sumk += tmpkk+0; console.log("skk: " + sumkk);}
console.log("s12: " + sumk);
}
sumk/=10000;
//var outP = document.getElementById('sum');
//outP.innerHTML = sum;
var app = pc.Application.getApplication();
var text1 = app.root.findByName("Text1FR");
text1.element.text ="u: "+ sumk;
};
First a CSV-file is imported to a table at higher z-index like this (Choose an example.csv):
Temporarely one can access the uploaded project here: https://amfibios.dk/ARImgur/YTD/mixDF10/
Detail:
The ‘sumk/=10000;’ part is (by clicking the ‘Reaktion:’ button ‘Click me’ after import) fetched at playcanvas-level to be shown at ‘u: 2451.3008’ (which equals all the text table values summed up and then divided by 10000).
Anyway: The conclusion is that the top level (highest z-index) tables are in the way. I want to render them by PHP/MySQL-> echo instead, … but to be ‘hidden’ (yes)
It sounds like you can have the table as a data structure rather than HTML. I don’t really see anything in the code you have shown that needs it to be in a DOM object.
In the case of hiding the table DOM object, can you set the CSS so display: none
? That would stop it from showing on the page.
works perfect now! Thx again