Open full view…

Call Javascript from child?

Fri, 19 Jul 2019 00:18:23 GMT

I have several forms with embedded frames. Do you have any examples of being able to call and embed page buttons from the parent or being able to call a parent's buttons from the child iframe? In my case I'll have to call the actual submit button so I'd use Javascript.

Rob Lintern (HCL)
Mon, 22 Jul 2019 22:15:26 GMT

If the iframe content is in the same domain as the main form, then you should be able to achieve this, otherwise the browser's same-domain security policy will probably block you. Exactly what you can do will also likely be limited by the "secureJS" config property of the product. Perhaps try something like: --- var stageActions = top.NitroApplication.getForm("F_Form1").getStageActions(); forEach(stageActions, function (actionButton) { if(actionButton.getId() === 'S_Submit1') { actionButton.activate(); break; } }); ---