<?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: How do I call a Python script from a html button ? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/how-do-i-call-a-python-script-from-a-html-button/m-p/183086#M14063</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Julie,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The iBus app used queries to map services of feature classes.&amp;nbsp; But I do have another app the calls a geoprocessing script.&amp;nbsp; The python geoprocessing script creates a parcel map PDF when a link or button is clicked for the related parcel being displayed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Apr 2015 20:51:59 GMT</pubDate>
    <dc:creator>TomSellsted</dc:creator>
    <dc:date>2015-04-08T20:51:59Z</dc:date>
    <item>
      <title>How do I call a Python script from a html button ?</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-call-a-python-script-from-a-html-button/m-p/183083#M14060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I have a web page&amp;nbsp; form with 'submit' on this simple Javascript API &lt;A href="http://If I had a form with 'submit' on this simple Javascript API sample(http//developers.arcgis.com/javascript/samples/ags_createwebmapid/) , how would I call the Python script on clicking the submit button? any thoughts or ideas?"&gt;sample&lt;/A&gt;, how would I call the Python script on clicking the submit button? any thoughts or ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Apr 2015 18:31:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-call-a-python-script-from-a-html-button/m-p/183083#M14060</guid>
      <dc:creator>JulieK</dc:creator>
      <dc:date>2015-04-08T18:31:36Z</dc:date>
    </item>
    <item>
      <title>Re: How do I call a Python script from a html button ?</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-call-a-python-script-from-a-html-button/m-p/183084#M14061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Julie,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could publish your python script as a geoprocessing service on your ArcGIS Server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Apr 2015 20:33:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-call-a-python-script-from-a-html-button/m-p/183084#M14061</guid>
      <dc:creator>TomSellsted</dc:creator>
      <dc:date>2015-04-08T20:33:24Z</dc:date>
    </item>
    <item>
      <title>Re: How do I call a Python script from a html button ?</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-call-a-python-script-from-a-html-button/m-p/183085#M14062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good idea Tom, I will give that a try. &lt;/P&gt;&lt;P&gt;You did that with your ibus app right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Apr 2015 20:43:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-call-a-python-script-from-a-html-button/m-p/183085#M14062</guid>
      <dc:creator>JulieK</dc:creator>
      <dc:date>2015-04-08T20:43:50Z</dc:date>
    </item>
    <item>
      <title>Re: How do I call a Python script from a html button ?</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-call-a-python-script-from-a-html-button/m-p/183086#M14063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Julie,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The iBus app used queries to map services of feature classes.&amp;nbsp; But I do have another app the calls a geoprocessing script.&amp;nbsp; The python geoprocessing script creates a parcel map PDF when a link or button is clicked for the related parcel being displayed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Apr 2015 20:51:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-call-a-python-script-from-a-html-button/m-p/183086#M14063</guid>
      <dc:creator>TomSellsted</dc:creator>
      <dc:date>2015-04-08T20:51:59Z</dc:date>
    </item>
    <item>
      <title>Re: How do I call a Python script from a html button ?</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-call-a-python-script-from-a-html-button/m-p/183087#M14064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tom,&lt;/P&gt;&lt;P&gt;Please guide me through this.&lt;/P&gt;&lt;P&gt;I am using ArcGIS 10.2 and&lt;/P&gt;&lt;P&gt;- At the desired location, I created a new toolbox in ArcCatalog.&lt;/P&gt;&lt;P&gt;-Right clicked the toolbox and Added a python script. &lt;/P&gt;&lt;P&gt;-Pointed it to my python script.&lt;/P&gt;&lt;P&gt;-Created two parameter values &lt;/P&gt;&lt;P&gt;Am I in the right path?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My python script has a function that takes two parameters &lt;/P&gt;&lt;P&gt; def formInfo(Name, activeMile):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, when I run the toolbox I created, it let me fill two parameters but it doesn't look like it is passing it to the script. The tool gives the message that it ran successfully but it doesn't look like my script&amp;nbsp; with the parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In 10.2 , there is also an option to create a new 'Python Toolbox' should I be using this? any thoughts?&lt;/P&gt;&lt;P&gt;appreciate your help!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Apr 2015 18:42:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-call-a-python-script-from-a-html-button/m-p/183087#M14064</guid>
      <dc:creator>JulieK</dc:creator>
      <dc:date>2015-04-13T18:42:08Z</dc:date>
    </item>
    <item>
      <title>Re: How do I call a Python script from a html button ?</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-call-a-python-script-from-a-html-button/m-p/183088#M14065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Julie,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, you are on the right path.&amp;nbsp; The parameters you are filling in have to be tied to the logic you will use to do the analysis you are trying to run.&amp;nbsp; Otherwise they are just parameters.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are trying to run it in a web browser, you will need to publish the script to ArcGIS Server to be able to access it from the web.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Apr 2015 18:59:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-call-a-python-script-from-a-html-button/m-p/183088#M14065</guid>
      <dc:creator>TomSellsted</dc:creator>
      <dc:date>2015-04-13T18:59:29Z</dc:date>
    </item>
    <item>
      <title>Re: How do I call a Python script from a html button ?</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-call-a-python-script-from-a-html-button/m-p/183089#M14066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;how do I do this?&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;' The parameters you are filling in have to be tied to the logic you will use to do the analysis you are trying to run.'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;The function in the script accepts two paramaters and the toolbox lets you enter two parameters. how do I tie it together?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Apr 2015 19:16:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-call-a-python-script-from-a-html-button/m-p/183089#M14066</guid>
      <dc:creator>JulieK</dc:creator>
      <dc:date>2015-04-13T19:16:27Z</dc:date>
    </item>
    <item>
      <title>Re: How do I call a Python script from a html button ?</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-call-a-python-script-from-a-html-button/m-p/183090#M14067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;should I be doing this?&lt;/P&gt;&lt;P&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#/Accessing_parameters_in_a_script_tool/001500000007000000/" title="http://resources.arcgis.com/en/help/main/10.1/index.html#/Accessing_parameters_in_a_script_tool/001500000007000000/"&gt;ArcGIS Help 10.1&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Apr 2015 19:28:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-call-a-python-script-from-a-html-button/m-p/183090#M14067</guid>
      <dc:creator>JulieK</dc:creator>
      <dc:date>2015-04-13T19:28:59Z</dc:date>
    </item>
    <item>
      <title>Re: How do I call a Python script from a html button ?</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-call-a-python-script-from-a-html-button/m-p/183091#M14068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tom,&lt;/P&gt;&lt;P&gt;That helped!! I have tied the parameters with the logic....phew.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;next will get to publishing it to the server. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Apr 2015 19:51:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-call-a-python-script-from-a-html-button/m-p/183091#M14068</guid>
      <dc:creator>JulieK</dc:creator>
      <dc:date>2015-04-13T19:51:43Z</dc:date>
    </item>
    <item>
      <title>Re: How do I call a Python script from a html button ?</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-call-a-python-script-from-a-html-button/m-p/183092#M14069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Julie,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Excellent!&amp;nbsp; I should have put a link for you about retrieving the parameters in the last message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Apr 2015 20:27:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-call-a-python-script-from-a-html-button/m-p/183092#M14069</guid>
      <dc:creator>TomSellsted</dc:creator>
      <dc:date>2015-04-13T20:27:59Z</dc:date>
    </item>
    <item>
      <title>Re: How do I call a Python script from a html button ?</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-call-a-python-script-from-a-html-button/m-p/183093#M14070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is this how I should access the toolbox in a web application?&lt;/P&gt;&lt;P&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#/Using_geoprocessing_tasks_in_web_applications/0154000004v8000000/" title="http://resources.arcgis.com/en/help/main/10.1/index.html#/Using_geoprocessing_tasks_in_web_applications/0154000004v8000000/"&gt;ArcGIS Help 10.1&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Apr 2015 21:03:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-call-a-python-script-from-a-html-button/m-p/183093#M14070</guid>
      <dc:creator>JulieK</dc:creator>
      <dc:date>2015-04-13T21:03:14Z</dc:date>
    </item>
    <item>
      <title>Re: How do I call a Python script from a html button ?</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-call-a-python-script-from-a-html-button/m-p/183094#M14071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Julie,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes!&amp;nbsp; Be aware that the service for the geoprocessing task by default is asynchronous, so you would use a submitJob to request that geoprocessing task.&amp;nbsp; If it is a synchronous task, then you would use execute.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Apr 2015 21:11:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-call-a-python-script-from-a-html-button/m-p/183094#M14071</guid>
      <dc:creator>TomSellsted</dc:creator>
      <dc:date>2015-04-13T21:11:52Z</dc:date>
    </item>
    <item>
      <title>Re: How do I call a Python script from a html button ?</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-call-a-python-script-from-a-html-button/m-p/183095#M14072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Tom,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using a tool called arcREST( &lt;A href="https://github.com/Esri/ArcREST/tree/October2014v1.0Final" title="https://github.com/Esri/ArcREST/tree/October2014v1.0Final"&gt;Esri/ArcREST at October2014v1.0Final · GitHub&lt;/A&gt; ) in my Python script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the ArcGIS Server,&lt;/P&gt;&lt;P&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; we installed arcREST tool &lt;/P&gt;&lt;P&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The script ran successfully.&lt;/P&gt;&lt;P&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Created a Toolbox and added the Python script.&lt;/P&gt;&lt;P&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The toolbox ran successfully&lt;/P&gt;&lt;P&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Created a geoprocessing service &lt;/P&gt;&lt;P&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Gives error saying "no module named arcrest Failed to execute"&lt;/P&gt;&lt;P&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Based on this &lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#/Authoring_geoprocessing_tasks_with_Python_scripts/00570000007r000000/"&gt;link&lt;/A&gt; , tried using sys.path.append &lt;/P&gt;&lt;P&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Still the same error. "no module named arcrest Failed to execute"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any thoughts ? idea ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2015 19:53:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-call-a-python-script-from-a-html-button/m-p/183095#M14072</guid>
      <dc:creator>JulieK</dc:creator>
      <dc:date>2015-04-16T19:53:23Z</dc:date>
    </item>
    <item>
      <title>Re: How do I call a Python script from a html button ?</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-call-a-python-script-from-a-html-button/m-p/183096#M14073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Julie,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes!&amp;nbsp; ArcMap is a 32bit application and uses the python 32 bit library.&amp;nbsp; The module that works successfully in ArcMap must also be installed onto the server.&amp;nbsp; ArcGIS Server uses a 64bit python library, so you will have to install it again using the 64bit version of the module.&amp;nbsp; I have had to do the same thing with cx_Oracle for interacting with our utility accounts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2015 20:17:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-call-a-python-script-from-a-html-button/m-p/183096#M14073</guid>
      <dc:creator>TomSellsted</dc:creator>
      <dc:date>2015-04-16T20:17:55Z</dc:date>
    </item>
    <item>
      <title>Re: How do I call a Python script from a html button ?</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-call-a-python-script-from-a-html-button/m-p/183097#M14074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tom,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You said it! We installed the tool in 64bit Python folder and it did it!!&lt;/P&gt;&lt;P&gt;thanks a ton:)&lt;/P&gt;&lt;P&gt;have a great day!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2015 20:48:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-call-a-python-script-from-a-html-button/m-p/183097#M14074</guid>
      <dc:creator>JulieK</dc:creator>
      <dc:date>2015-04-16T20:48:30Z</dc:date>
    </item>
    <item>
      <title>Re: How do I call a Python script from a html button ?</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-call-a-python-script-from-a-html-button/m-p/183098#M14075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Julie,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Excellent!&amp;nbsp; Glad you got it working!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2015 20:51:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-call-a-python-script-from-a-html-button/m-p/183098#M14075</guid>
      <dc:creator>TomSellsted</dc:creator>
      <dc:date>2015-04-16T20:51:20Z</dc:date>
    </item>
  </channel>
</rss>

