Forum Discussion
EverettPatterso
6 years agoQrew Captain
If you are familiar with script, then yes it's easily done.
HTML in description
------------------------------
Everett Patterson
------------------------------
HTML in description
Legend <br><div style="border: 1px solid black; width: 450px;"> <img src="https://images.quickbase.com/si/24/206-enable.png">Completed<br> <img src="https://images.quickbase.com/si/24/238-triang_gray.png">Missing Phone Start Date<br> <img src="https://images.quickbase.com/si/24/240-triang_green.png">On Time<br> <img src="https://images.quickbase.com/si/24/213-warning2.png">Past Due<br></div><br> Report as of: <span class="mytoday" style="font-size: 24px"></span>
Script to replace description text with HTML and inserts current date/time
(function(){ var querystring=document.location.search; if(/a=q/i.test(querystring)) { var description = $("#introText").text().replace(/script/g, "span"); $("#introText").html(description); var mytoday = new Date().toLocaleString(); $(".mytoday").html(mytoday); } if(/a=td/i.test(querystring)) { var description = $("#descriptionInFacets").text().replace(/script/g, "span"); $("#descriptionInFacets").html(description); var mytoday = new Date().toLocaleString(); $(".mytoday").html(mytoday); } if(/dlta=mog/i.test(querystring)) { var description = $("#descriptionInFacets").text().replace(/script/g, "span"); $("#descriptionInFacets").html(description); var mytoday = new Date().toLocaleString(); $(".mytoday").html(mytoday); } })();
------------------------------
Everett Patterson
------------------------------
AdamKeever1
6 years agoQrew Commander
Copy & Paste gives me this syntax error and I can't find a fix:
------------------------------
Adam Keever
------------------------------
------------------------------
Adam Keever
------------------------------
- EverettPatterso6 years agoQrew CaptainLooks like you put that into a formula field, that code goes into a code page.
You would use the IOL technique in a formula field to load the code page.
[iol] & "module.js" & [/iol]
Check out this link if you need more info, How Do I Setup the Image Onload Technique (IOL)?
------------------------------
Everett Patterson
------------------------------- AdamKeever16 years agoQrew CommanderHere is the result I get with IOL:
------------------------------
Adam Keever
------------------------------- EverettPatterso6 years agoQrew CaptainOpen your dev tools F12 and put this code into the console while on the report, does it work then?
var description = $("#introText").text().replace(/script/g, "span"); $("#introText").html(description); var mytoday = new Date().toLocaleString(); $(".mytoday").html(mytoday);
or
var description = $("#descriptionInFacets").text().replace(/script/g, "span"); $("#descriptionInFacets").html(description); var mytoday = new Date().toLocaleString(); $(".mytoday").html(mytoday);
------------------------------
Everett Patterson
------------------------------