Skip to main content

I have a javascript file containing some functions and variables. I want to reference the javascript file or inject the script into my smartform and I  need those function to execute on click of a button and also transfer the value of the variables to data labels on the form.

Any idea on how to achieve this?

 

Thank you

Hello,


 


I have done this in the past by using an Expression and a Data Label Contorl.


#1. Create a Data Label control and set the Literal property to checked.


#2. Create an Expression that holds all of your Javascript.


#3. Use a Transfer Data method to transfer the Expression into the Data Label. This should execute your code. You can move this code around your form depending on when you need to execute it. 


Continuing off of what MTMTNT said, after checking the literal property on the data label, I've noticed that sometimes the "Prevent XSS" check box needs to be un-checked also for the JavaScript to run.

Reply