Using document.getElementById(id) to implent a splash screen


I am trying to implement a splash screen and use the document.getElementById(id) javascript  to get the element id and then add or remove the necessary css class.

var element = document.getElementById($parameters.canvasId);


element.classList.remove ('splashAnimationHide');

I have tryed different codes for the getElement but not being able to get a working one, and the element variable keeps returning null.

Please find an example of the code attached, it´s on the OnInitialize Screen1 action.

Thank you

Sam A.


Hi Samuel ,

My name is Cristian, And I am helping in the forum with the intention of becoming an MVP, your like helps me a lot and even better if I manage to solve your issue.

You could create a variable of type text, and based on it modify the class of the element.

Best Regards,



Hi Cristian,

I'm not sure how you think people become MVPs, but it is not by begging other people to like your posts! Please help people if you want to help them, but don't do it just because you want some status!

Hi Samuel,

Here is another solution using javascript.

In this example,We are using the use of javascript.


Both are good solutions, could you mark them as a solution.

Best Regards,

InputParameterCSS (1).oml

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.