<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: CL_GUI_HTML_VIEWER JavaScript problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-gui-html-viewer-javascript-problem/m-p/607454#M24958</link>
    <description>&lt;P&gt;Thanks for your answer. I think predefined &lt;EM&gt;form&lt;/EM&gt; with fixed &lt;EM&gt;action&lt;/EM&gt; value and dynamic &lt;EM&gt;input&lt;/EM&gt; set will work for me.&lt;/P&gt;</description>
    <pubDate>Sun, 13 May 2018 11:08:58 GMT</pubDate>
    <dc:creator>maxim_schibnev</dc:creator>
    <dc:date>2018-05-13T11:08:58Z</dc:date>
    <item>
      <title>CL_GUI_HTML_VIEWER JavaScript problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-gui-html-viewer-javascript-problem/m-p/607452#M24956</link>
      <description>&lt;P&gt;Hello, experts.&lt;BR /&gt;&lt;BR /&gt;I faced a weird problem. Inside of CL_GUI_HTML_VIEWER I use the following JavaScript code to raise POST SAPEVENT:&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;var form = document.createElement("form");
form.setAttribute("method", "post");
form.setAttribute("action", "sapevent:foobar");
  
var field = document.createElement("input");
field.setAttribute("name", "foo");
field.setAttribute("value", "bar");
form.appendChild(field);
document.body.appendChild(form);
form.submit();&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;In SAP GUI for Windows this works fine. But when I use SAP GUI for Java both POSTDATA and QUERY_TABLE are empty. What could be the problem? And how can it be solved?&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;UPDATE:&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;It seems to be some security issue. Once form's action is changed with JavaScript, the form fields are no longer sent to the backend wit SAPEVENT. This happens only in SAP GUI for Java. In SAP GUI for Windows everything works fine. Any ideas how to fix it?&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Sat, 12 May 2018 19:35:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-gui-html-viewer-javascript-problem/m-p/607452#M24956</guid>
      <dc:creator>maxim_schibnev</dc:creator>
      <dc:date>2018-05-12T19:35:53Z</dc:date>
    </item>
    <item>
      <title>Re: CL_GUI_HTML_VIEWER JavaScript problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-gui-html-viewer-javascript-problem/m-p/607453#M24957</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
  &lt;P&gt;I did some research a while ago, see &lt;A href="https://github.com/larshp/abapGit/issues/1319" target="test_blank"&gt;https://github.com/larshp/abapGit/issues/1319&lt;/A&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;Judging from the changelogs and looking into the JAR file, SAP GUI for Java uses the JavaFX WebView component based on webkit, which has some quirks. I'm not sure how to figure out what is supported, and the exact versions.&lt;/P&gt;
  &lt;P&gt;For the above code to work, I guess SAP has to update the GUI, or the Java version has to be updated along with webkit.&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;I suggest you consider workarounds, one solution could be to make a BSP page with the code and expose it, but it depends on your exact use case.&lt;/P&gt;</description>
      <pubDate>Sun, 13 May 2018 09:45:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-gui-html-viewer-javascript-problem/m-p/607453#M24957</guid>
      <dc:creator>larshp</dc:creator>
      <dc:date>2018-05-13T09:45:01Z</dc:date>
    </item>
    <item>
      <title>Re: CL_GUI_HTML_VIEWER JavaScript problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-gui-html-viewer-javascript-problem/m-p/607454#M24958</link>
      <description>&lt;P&gt;Thanks for your answer. I think predefined &lt;EM&gt;form&lt;/EM&gt; with fixed &lt;EM&gt;action&lt;/EM&gt; value and dynamic &lt;EM&gt;input&lt;/EM&gt; set will work for me.&lt;/P&gt;</description>
      <pubDate>Sun, 13 May 2018 11:08:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-gui-html-viewer-javascript-problem/m-p/607454#M24958</guid>
      <dc:creator>maxim_schibnev</dc:creator>
      <dc:date>2018-05-13T11:08:58Z</dc:date>
    </item>
  </channel>
</rss>

