1 Reply Latest reply on May 12, 2016 9:07 PM by sudhanshu.singh

    Inject Javascript during run-time in HTML5 forms

    tarekahf Level 1

      I found out that under HTML5 forms I can write Javascript code that can access the entire document model and any code that would normally run in a browser, it would run under HTML5 element events.

      For example see snapshots below below. I add this code to the click event:

      debugger; txtImageStr.rawValue = imgFld.rawValue; imgFld.rawValue = null; app.alert("button id _5 = " + document.getElementById("_5").id); document.getElementsByName("_5")[0].addEventListener("click", myFunc)

      And it worked properly when used the LC Forms Manager to preview the form

      Question: Does this mean I can use Javascript Code Injection method to enrich the client side functionality for example, to add image controls and similar stuff?