<?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: I have a issue with Ajax and JQuery in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/i-have-a-issue-with-ajax-and-jquery/m-p/109698#M30752</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/36939"&gt;@sanjaybandhniya&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have a practical example to practice a Post method?&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
    <pubDate>Thu, 14 May 2020 13:23:50 GMT</pubDate>
    <dc:creator>viperboys</dc:creator>
    <dc:date>2020-05-14T13:23:50Z</dc:date>
    <item>
      <title>I have a issue with Ajax and JQuery</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/i-have-a-issue-with-ajax-and-jquery/m-p/109696#M30750</link>
      <description>&lt;P&gt;Hi..&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am working with Folder Rules. I want a POST method to be executed when a file is created in the folder.&amp;nbsp;I upload the JS file to the SCRIPT directory. I have everything configured.&amp;nbsp;This is the content of my file&lt;/P&gt;&lt;P&gt;function traer(){&lt;BR /&gt;var user = "Luis";&lt;BR /&gt;var name ="Diaz";&lt;BR /&gt;//alert("Nombre: " + user + " Apellido: " + name);&lt;/P&gt;&lt;P&gt;$.ajax({&lt;BR /&gt;type: "POST",&lt;BR /&gt;url: "http://localhost/alfresco/index.php/wp-json/gf/v2/workflow/webhooks/10/Fytn4QUNj9XWrzcvRzAPG79CB",&lt;BR /&gt;data:{Nombre:user, Apellido:name},&lt;BR /&gt;success: function(data)&lt;BR /&gt;{&lt;BR /&gt;alert ("Muy bien");&lt;BR /&gt;}&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;} // Cierra de la funcion TRAER&lt;BR /&gt;traer();&lt;/P&gt;&lt;P&gt;This works fine in my custom code but in Alfresco it doesn't work for me.&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my error&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;DIV class="yui-dt-liner"&gt;&lt;DIV class="fileupload-center-div"&gt;&lt;SPAN class="fileupload-filesize-span"&gt;20 KB (Error: Failed to execute script 'workspace://SpacesStore/f2d8d60b-6bcd-425e-9b5c-6927b42d44f3': 04130025 ReferenceError: "jQuery" is not defined. (workspace://SpacesStore/f2d8d60b-6bcd-425e-9b5c-6927b42d44f3#6))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;&lt;DIV class="yui-dt-liner"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;It does not detect the Jquery tag nor $ .Ajax&lt;/P&gt;</description>
      <pubDate>Wed, 13 May 2020 22:44:22 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/i-have-a-issue-with-ajax-and-jquery/m-p/109696#M30750</guid>
      <dc:creator>viperboys</dc:creator>
      <dc:date>2020-05-13T22:44:22Z</dc:date>
    </item>
    <item>
      <title>Re: I have a issue with Ajax and JQuery</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/i-have-a-issue-with-ajax-and-jquery/m-p/109697#M30751</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;We can call ajax from client side javascript and javascript which you are using rule , it is server side script so you can not call ajax.&lt;/P&gt;&lt;P&gt;There is another way where you can call java method from script and from java code you can call external service.&lt;/P&gt;&lt;P&gt;Please refer below thread.&lt;/P&gt;&lt;P&gt;&lt;A href="https://hub.alfresco.com/t5/alfresco-content-services-forum/call-external-class-by-javascript-in-rules-of-folder/td-p/795" target="_self" rel="nofollow noopener noreferrer"&gt;call-external-class-by-javascript-in-rules-of-folder&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 May 2020 05:40:21 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/i-have-a-issue-with-ajax-and-jquery/m-p/109697#M30751</guid>
      <dc:creator>sp2</dc:creator>
      <dc:date>2020-05-14T05:40:21Z</dc:date>
    </item>
    <item>
      <title>Re: I have a issue with Ajax and JQuery</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/i-have-a-issue-with-ajax-and-jquery/m-p/109698#M30752</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/36939"&gt;@sanjaybandhniya&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have a practical example to practice a Post method?&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Thu, 14 May 2020 13:23:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/i-have-a-issue-with-ajax-and-jquery/m-p/109698#M30752</guid>
      <dc:creator>viperboys</dc:creator>
      <dc:date>2020-05-14T13:23:50Z</dc:date>
    </item>
    <item>
      <title>Re: I have a issue with Ajax and JQuery</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/i-have-a-issue-with-ajax-and-jquery/m-p/109699#M30753</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Which type of example you want me to provide?&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2020 07:17:20 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/i-have-a-issue-with-ajax-and-jquery/m-p/109699#M30753</guid>
      <dc:creator>sp2</dc:creator>
      <dc:date>2020-05-15T07:17:20Z</dc:date>
    </item>
    <item>
      <title>Re: I have a issue with Ajax and JQuery</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/i-have-a-issue-with-ajax-and-jquery/m-p/109700#M30754</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/36939"&gt;@sanjaybandhniya&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much for you helping&lt;/P&gt;&lt;P&gt;An example of how to execute a POST method on a folder rule.&amp;nbsp;From the beginning I thought that this custom code would work for me&lt;/P&gt;&lt;P&gt;function traer(){&lt;BR /&gt;var user = "Luis";&lt;BR /&gt;var name ="Diaz";&lt;BR /&gt;alert("Nombre: " + user + " Apellido: " + name);&lt;/P&gt;&lt;P&gt;$.ajax({&lt;BR /&gt;type: "POST",&lt;BR /&gt;url: "http://localhost/alfresco/index.php/wp-json/gf/v2/workflow/webhooks/10/Fytn4QUNj9XWrzcvRzAPG79CB",&lt;BR /&gt;data:{Nombre:user, Apellido:name},&lt;BR /&gt;success: function(data)&lt;BR /&gt;{&lt;BR /&gt;alert ("Muy bien");&lt;BR /&gt;}&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;} // Cierra de la funcion TRAER&lt;BR /&gt;traer();&lt;/P&gt;&lt;P&gt;But the reality is that it is not as simple as it sounds.&amp;nbsp;I would like an example of how to do a POST method step by step from a folder rule.&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2020 13:55:42 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/i-have-a-issue-with-ajax-and-jquery/m-p/109700#M30754</guid>
      <dc:creator>viperboys</dc:creator>
      <dc:date>2020-05-15T13:55:42Z</dc:date>
    </item>
    <item>
      <title>Re: I have a issue with Ajax and JQuery</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/i-have-a-issue-with-ajax-and-jquery/m-p/109701#M30755</link>
      <description>&lt;P&gt;Hi, Rulescript is server side script so you can not call ajax from that.&lt;/P&gt;</description>
      <pubDate>Sat, 16 May 2020 02:57:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/i-have-a-issue-with-ajax-and-jquery/m-p/109701#M30755</guid>
      <dc:creator>sp2</dc:creator>
      <dc:date>2020-05-16T02:57:00Z</dc:date>
    </item>
  </channel>
</rss>

