<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Call JavaScript in a button interface</title><link>https://community.appian.com/discussions/f/user-interface/17422/call-javascript-in-a-button-interface</link><description>Hello 
 
 Hello. I have a requirement in which I need to make an AJAX call using JavaScript in a button, does anyone knows if this is possible?</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Call JavaScript in a button interface</title><link>https://community.appian.com/thread/68745?ContentTypeID=1</link><pubDate>Mon, 12 Aug 2019 10:50:08 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ebbb6ac1-9867-41e2-9e94-109cea2c5844</guid><dc:creator>Dai Williams</dc:creator><description>&lt;p&gt;So as a few of the replies have said so far, you cannot execute javascript from a button, however, dependent on your use case, Appian now has the ability to have AJAX style functionality within forms using&amp;nbsp;&lt;a href="https://docs.appian.com/suite/help/19.2/Appian_Release_Notes.html#auto-refreshing-interfaces" rel="noopener noreferrer" target="_blank"&gt;auto refreshing interfaces&lt;/a&gt;&amp;nbsp;- have a look at that. There are some limitations, but it does make interface design a lot more interactive and responsive.&lt;/p&gt;
&lt;p&gt;Hope that helps!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Call JavaScript in a button interface</title><link>https://community.appian.com/thread/68730?ContentTypeID=1</link><pubDate>Fri, 09 Aug 2019 12:51:05 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0743255b-d8c3-4ab4-95c5-0f91bdd471f3</guid><dc:creator>Peter Lewis</dc:creator><description>&lt;p&gt;It would be helpful to know what you want to achieve&amp;nbsp;using&amp;nbsp;an AJAX call. It&amp;#39;s not possible to directly use JavaScript in a button (or in an Appian SAIL form), but there are a lot of ways to set up dynamic behavior using SAIL (or possibly plugins). Can you provide some background on what you&amp;#39;re trying to achieve?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Call JavaScript in a button interface</title><link>https://community.appian.com/thread/68698?ContentTypeID=1</link><pubDate>Thu, 08 Aug 2019 16:53:54 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c96d5743-604b-484c-88f2-fca85bc29364</guid><dc:creator>davel001150</dc:creator><description>&lt;p&gt;You can have a button submit a form, and after submit send process flow to a node that calls a webservice or plugin.&amp;nbsp; Your webservice could contain potentially any code you want, including an AJAX call, and your plugin would be Java, which can do theoretically anything Java can do.&lt;/p&gt;
&lt;p&gt;If you&amp;#39;re attempting to make AJAX make the Appian screen instantly refresh, I don&amp;#39;t know how that will work.&amp;nbsp; You could probably change some local variables and set the form to reevaluate the instant that happens with the new a!localVariables from 19.2.&lt;/p&gt;
&lt;p&gt;You also might be able to call a custom rule built from a plugin inside the saveInto block of a button that&amp;#39;s not configured to submit.&lt;/p&gt;
&lt;p&gt;It all depends on your specific use case.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>