12-04-2019 06:57 AM
Sorry - this is likely a very obvious / simple problem (to some!).
When I use a sample gadget which is loaded to the 3rdpartygadget/files folder on the finesse server - the gadget works.
When I use it on a external webserver it does not and this seems to fail due to JavaScript Libraries not loading - e.g. I get an error for the jQuery not loading correctly.
I see the below error in the logs - which does not occur when I use use the finesse hosted version:
https%3A%2F%2Fmyservername%2Fgadget%2FUpdateCallVariableData%2FUpdateCallVariableDataSampleGadget.js:21628 Uncaught ReferenceError: jQuery is not defined
I have used the below in my XML - which I thought would allow it to retrieve the finesse hosted jQuery?
<script type="text/javascript" src="__UP_scheme__://__UP_host__:__UP_hostPort__/desktop/assets/js/jquery.min.js"></script>
Below is my full XML file.
<?xml version="1.0" encoding="UTF-8"?> <Module> <ModulePrefs title="Update Call Variable Data" description="Update Call Variable Data"> <Require feature="settitle" /> <Require feature="dynamic-height" /> <Require feature="pubsub-2" /> <Require feature="setprefs" /> <Require feature="loadingindicator"> <Param name="manual-dismiss">false</Param> <Param name="loading-timeout">60</Param> </Require> </ModulePrefs> <Content type="html"> <![CDATA[ <!DOCTYPE html> <!-- Styling --> <link rel="stylesheet" href="UpdateCallVariableDataSampleGadget.css" type="text/css" /> <UserPref name="scheme" display_name="scheme" default_value=""/> <UserPref name="host" display_name="host" default_value=""/> <UserPref name="hostPort" display_name="hostPort" default_value=""/> <!-- jQuery --> <script type="text/javascript" src="__UP_scheme__://__UP_host__:__UP_hostPort__/desktop/assets/js/jquery.min.js"></script> <!-- Finesse Library --> <script type="text/javascript" src="__UP_scheme__://__UP_host__:__UP_hostPort__/desktop/assets/js/finesse.js"></script> <!-- Gadget Business Logic --> <script type="text/javascript" src="UpdateCallVariableDataSampleGadget.js"></script> <body class="claro"> <div> <fieldset id="callvariableset" class="outline"> <div id="callVariablesDiv"></div> </fieldset> </div> </body> <script type="text/javascript"> // initialize the gadget running the init handler defined in UpdateCallVariableDataSampleGadget.js gadgets.HubSettings.onConnect = function () { finesse.modules.SampleGadget.init(); }; </script> ]]> </Content> </Module>
Any ideas on what I am doing incorrectly?
Gerry
Solved! Go to Solution.
12-05-2019 12:33 AM
It was a simple error!
I had place the below incorrectly into Content Section. While it should be have placed into the Main Module section
<UserPref name="scheme" display_name="scheme" default_value=""/> <UserPref name="host" display_name="host" default_value=""/> <UserPref name="hostPort" display_name="hostPort" default_value=""/>
Here the full XML file for reference and it works fine now.
<?xml version="1.0" encoding="UTF-8"?> <Module> <ModulePrefs title="Update Call Variable Data" description="Update Call Variable Data"> <Require feature="settitle" /> <Require feature="dynamic-height" /> <Require feature="pubsub-2" /> <Require feature="setprefs" /> <Require feature="loadingindicator"> <Param name="manual-dismiss">false</Param> <Param name="loading-timeout">60</Param> </Require> </ModulePrefs> <UserPref name="scheme" display_name="scheme" default_value=""/> <UserPref name="host" display_name="host" default_value=""/> <UserPref name="hostPort" display_name="hostPort" default_value=""/> <Content type="html"> <![CDATA[ <!DOCTYPE html> <!-- Styling --> <link rel="stylesheet" href="UpdateCallVariableDataSampleGadget.css" type="text/css" /> <!-- jQuery --> <script type="text/javascript" src="__UP_scheme__://__UP_host__:__UP_hostPort__/desktop/assets/js/jquery.min.js"></script> <!-- Finesse Library --> <script type="text/javascript" src="__UP_scheme__://__UP_host__:__UP_hostPort__/desktop/assets/js/finesse.js"></script> <!-- Gadget Business Logic --> <script type="text/javascript" src="UpdateCallVariableDataSampleGadget.js"></script> <body class="claro"> <div> <fieldset id="callvariableset" class="outline"> <div id="callVariablesDiv"></div> </fieldset> </div> </body> <script type="text/javascript"> // initialize the gadget running the init handler defined in UpdateCallVariableDataSampleGadget.js gadgets.HubSettings.onConnect = function () { finesse.modules.SampleGadget.init(); }; </script> ]]> </Content> </Module>
12-05-2019 12:33 AM
It was a simple error!
I had place the below incorrectly into Content Section. While it should be have placed into the Main Module section
<UserPref name="scheme" display_name="scheme" default_value=""/> <UserPref name="host" display_name="host" default_value=""/> <UserPref name="hostPort" display_name="hostPort" default_value=""/>
Here the full XML file for reference and it works fine now.
<?xml version="1.0" encoding="UTF-8"?> <Module> <ModulePrefs title="Update Call Variable Data" description="Update Call Variable Data"> <Require feature="settitle" /> <Require feature="dynamic-height" /> <Require feature="pubsub-2" /> <Require feature="setprefs" /> <Require feature="loadingindicator"> <Param name="manual-dismiss">false</Param> <Param name="loading-timeout">60</Param> </Require> </ModulePrefs> <UserPref name="scheme" display_name="scheme" default_value=""/> <UserPref name="host" display_name="host" default_value=""/> <UserPref name="hostPort" display_name="hostPort" default_value=""/> <Content type="html"> <![CDATA[ <!DOCTYPE html> <!-- Styling --> <link rel="stylesheet" href="UpdateCallVariableDataSampleGadget.css" type="text/css" /> <!-- jQuery --> <script type="text/javascript" src="__UP_scheme__://__UP_host__:__UP_hostPort__/desktop/assets/js/jquery.min.js"></script> <!-- Finesse Library --> <script type="text/javascript" src="__UP_scheme__://__UP_host__:__UP_hostPort__/desktop/assets/js/finesse.js"></script> <!-- Gadget Business Logic --> <script type="text/javascript" src="UpdateCallVariableDataSampleGadget.js"></script> <body class="claro"> <div> <fieldset id="callvariableset" class="outline"> <div id="callVariablesDiv"></div> </fieldset> </div> </body> <script type="text/javascript"> // initialize the gadget running the init handler defined in UpdateCallVariableDataSampleGadget.js gadgets.HubSettings.onConnect = function () { finesse.modules.SampleGadget.init(); }; </script> ]]> </Content> </Module>
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide