cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
277
Views
0
Helpful
1
Replies

Retrieving a parameter's value from a Gadget's URL

Gerry O'Rourke
Spotlight
Spotlight

Is it possible to retrieve a parameter value from the gadget url?

e.g. with the below example - how would you retrieve the value of the parameters "myparameter"?

 

Can this be done using the finesse.utilities.Utilities.getParameterByName(str, name)

Can anyone give a simple example?

 

finesse.utilities.Utilities.getParameterByName(str, name)
Takes a string (typically from window.location) and finds the value which corresponds to a name.

 

Example Gadget Config on Finesse Admin Desktop

<tab>
<id>Sample</id>
<label>Sample Gadget</label>
<gadgets>
<gadget>https://mywebserver.mydomain.com/gadgets/sample/sample.xml?myparameter1=blah</gadget>
</gadgets>
</tab>

 

Regards,

Gerry

1 Reply 1

dekwan
Cisco Employee
Cisco Employee

Hi Gerry,

 

Please take a look at the _initializeGadgetURLParams method of the WebexTeams sample gadget. It uses 

document.location.href.split("?")[1].split("&");

 

Thanx,

Denise

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: