slideshow + script - Forum | JoomShaper
Solved SP Page Builder

slideshow + script

Asked by Micheline Potvin 5 years ago Last activity 5 years ago

Hello,
i would like to display a script in my slideshow:
the script is simply a short sentence whit hour and date.
the script is good, but when i insert it into slide title, slide subtitle or slide content nothing appear.

thank you for your beautiful templates and your help!

'<'script>
var aujourdhui = new Date();
var annee = aujourdhui.getFullYear(); // retourne le millésime
var mois =aujourdhui.getMonth()+1; // date.getMonth retourne un entier entre 0 et 11 donc il faut ajouter 1
var jour = aujourdhui.getDate(); // retourne le jour (1à 31)
var joursemaine = aujourdhui.getDay() ; // retourne un entier compris entre 0 et 6 (0 pour dimanche)
var tab_jour=new Array("dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "Samedi");
var tab_mois=new Array("janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre");
var heures = aujourdhui.getHours();
var minutes = (aujourdhui.getMinutes()<10?'0':'') + aujourdhui.getMinutes();
var ampm = heures >= 12 ? 'soirée' : 'matinée';
document.write('<strong>Dieu bénisse votre ' +ampm + '</strong>, nous sommes ' + tab_jour[joursemaine] + ' ' + jour + ' ' + tab_mois[mois] + ' ' + annee+ ', il est ' + heures + ':' + minutes) ;
'<'/script>

Accepted answer

Marked as the solution
Rashida Rahman Staff

You have to be specific on item id in that case.

Actually, we do not provide customization support, as it is prohibited in our support policy.

Hope you understand.

Thanks for your cooperation:)

2 more replies

Micheline Potvin Asked this

Thank you, i see, i can add js in the template, but could you explain , how the output of the code can be return in the slide subtitle for example.
Thank you

Log in to reply.