Hello,
I am trying to use javascript to get the current date and time and display it in an expression. I have placed the function in the webscreen javascript window and called it from the expression. When I place an alert, the date and time appear correctly. However, when I try to display it normally, it doesn't appear. This is my code
SyntaxEditor Code Snippet (From the webscreen javascript editor)
function getDateTime(inputId){ var d = new Date(); var element = document.getElementByClassName(inputId); if(element != null){ element.value = d; }else{ alert("Empty"); } }
From the expression
SyntaxEditor Code Snippet
"<script language='javascript'> getDateTime("+DateTitle.Id+");</script>"
Please help