In FrontEnd Developer Specialist Guided path, under Javascript in Outsytems section, in Javascript API Excercise, we are told to pass the local variable to input parameter of js snippet, however, it is not working as expected.
Hence, I modified the code a bit and it is working fine. I have added an image for the reference
Thank you,
Mayur
Hi mayur,
can you share the code snippet which is not working. below is the format to pass local variable in javascript.
var inlocalValue = document.getElementById($parameters.InputWidgetID).value;
thanks
cv
Hi Chandra,
Thank you for the response. I found the solution to it.
I'm not sure what went wrong in your case. I've created the exact same exercise, and it's working as expected. I've attached a screen recording for your reference. Please compare it with yours to identify and resolve the issue.
Thank you Siya for the quick response. However, according to the video you posted, the container is hidden. I was trying to remove the text inside input widget.
Could you please confirm which section of the this assignment you are referring to ?
if you want to set the value of the Text widget inside the MyContainer first of all you need to set an Id for "Text" widget add the below in JS
var element = document.getElementById($parameters.WidgetIdentifier);if(element !== null){element.innerText = "";}
Yes I understood, Siya. I was trying to remove the text content of the input field.
Thank you for the help.