Explore the community Forums Lectora Lectora Questions & Answers how to apply javaScript to text box/objects? Reply To: how to apply javaScript to text box/objects?

#411944 Score: 0
Profile photo of Math Notermans
Math Notermans
friend finder
junior moderator
LUC16 Attendee
wise owl
curious george
129 pts

The script you use is old. Its from Lectora X10 era… at that time you couldnot set CSS classes for elements in Lectora thus this approach was needed to work with JS in Lectora X10. From version 11 and up that has changed very much.
Although i did notice this old way of using Javascript in Lectora worked up to version 16, you should only stick to it if you have an older version then Lectora 11… Follow Carls and approgs links and/or search the community for how to use Javascript in newer versions.

Actually i did use the script ( smoothHTMLtransitions.js ) too in X10. What it does..giving elements the option for a transition ( eg. fade ) now is as default available in the latest versions of Lectora. I am not sure in which version it debuted, but with the latest versions of Lectora you can simply select a transition for a page-element.

Kind regards,