Jump to content

malalibertecom

Members
  • Posts

    4
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

malalibertecom's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Good day Maymusic, Here I am again. ----------------------------------------- <div id="visi[@field:Vessel_Listing_Vessel]"></div> <script> var isi = document.getElementById("visi[@field:Vessel_Listing_Vessel]"); var now = new Date(); var expiration = new Date("[@field:vessel_certificats_doc_exp]"); if(expiration < now){ isi.innerHTML = 'RENEW'; isi.style.backgroundColor='red'; } else{ isi.innerHTML = 'OK'; isi.style.backgroundColor='green'; } </script> ------------------------------------------------------ Would you help find a way to make the flowing changes to this script: - Yellow for dates within the next 30 days, with ASK - No color (blank) for empty fields I am also running into a issue where the script CRASHES when I use it for a second HTML block/new date field. So I need to make this script check over 15 fields. Thanks for your help.
  2. Hi MayMusic, See the attached resulting from the above script. As you can see on the screen shot, the expired date of the DOC (first column) certificate not red but the script copied the date on the right with red background. Since I will have this page filled with dates to check for expiry, can you help suggest a script that would turn the DOC cell red instead of transposing the date on the right? Mmmm, not sure this is clear either... Also, can you propose a script that would also check the date for [@field:vessel_certificats_iapp_exp*] Thanks for your help. Marc
  3. Hi MayMusic, It works, thanks for your help. See attachment. The result of the expired date created a cumulus at the end of the report. Can you help make the following changes: - Making the the expired date field red instead of the current result. - As you can see, this report is all about expired documents. What would be the script to check more than one field like [@field:vessel_certificats_iapp_exp*] (Once I got the idea, Ill make the rest of the fields) - As you can see on the report page, the red field date format has changed to ENG US instead of ENG UK. Can this be avoided? Thanks for your help. Marc
  4. Hi I works great for me. Thanks. Could you help me with the same script but for multiple fileds with dates to check validity? And how to hightlight the [@field:Vessel_Listing_Vessel] and the expired date ONLY instead of the entire row. I have more than 15 date fileds fon each rows. Thanks Marc HERE is my scropt: <a id="visi[@field:Vessel_Listing_Vessel]"> <script> var isi = document.getElementById("visi[@field:Vessel_Listing_Vessel]"); var now = new Date(); var expiration = new Date("[@field:vessel_certificats_doc_exp*]"); if(expiration < now){ isi.parentNode.parentNode.style.backgroundColor = 'red'; } else{ isi.parentNode.parentNode.style.backgroundColor = '#NoColor'; } </script></a>
×
×
  • Create New...