Pass arbitrary data from the page, through the Activator Widget

This code was used for ASIS, and is more of a starting point for other events, rather than a plug and play solution. Be sure to consult dev. before using this code for your event.

<script src=""></script>

<script src="" data-ingo-id="WIDGET_ID_HERE">


function replaceUrlParam(url, paramName, paramValue){
if(paramValue == null)
paramValue = '';
var pattern = new RegExp('\\b('+paramName+'=).*?(&|$)')
return url.replace(pattern,'$1' + paramValue + '$2');
return url + (url.indexOf('?')>0 ? '&' : '?') + paramName + '=' + paramValue

$("#txtPriorityCode").on("change paste keyup", function() {
var url=window.location.href;
var newUrl = replaceUrlParam(url, "pc", $(this).val());
window.history.replaceState(null, null, newUrl);