The final HTML is a composition of HTML iframe elements, each for javascript node.
Therefore in your workflow you have one iframe for Generic Javascript node, and one iframe for quick form node.
Your example won’t work because you have two distinct document objects, one for iframe.
The problem is that we don’t know the iframes ids, so it is needed to dig into KNIME javascript files to find them.
I had a similar need in the past, so I solved it with an hack based on current KNIME javascipt files, so my method may stop working when KNIME updates them.
I modified your workflow to handle the button onclick event:
Webtask-Test.knwf (21.6 KB)
Regards,
Fabrizio