Dataset table cell comparision

Hello again.

I have another question. I tried to add some lines of code in datasetview.module.php to compare a string form a cell of a table and to display it with a specific background-color.

The commented lines from 630, 634 and 635 I tried to add but it doesn’t work. The code " $(“td:contains(‘Romania’)”).css(“background-color”, “red”); " is good because it works if I put it on a static table. If I look in browser with inspect element I can see this error: “POST http://127.0.0.1/xibo/index.php?p=timeline&q=RegionPreview&ajax=true 500 (Internal Server Error)”.

I would be grateful if someone can help me. Have a nice day!

This is because you want the JavaScript functionality before this: HTML Table with Javascript is implemented?

Try putting your script in here: https://github.com/xibosignage/xibo-cms/blob/master/modules/preview/HtmlTemplate.html#L35

It works Dan, thanks a lot!

I tried to do that but it didn’t work and I tried to do something manually.

Greetings!

1 Like