Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
(function($) {
$(document).ready(function() {
var getUrlParameter = function getUrlParameter(sParam) {
var sPageURL = decodeURIComponent(window.location.search.substring(1)),
sURLVariables = sPageURL.split('&'),
sParameterName,
i;
for (i = 0; i < sURLVariables.length; i++) {
sParameterName = sURLVariables[i].split('=');
if (sParameterName[0] === sParam) {
return sParameterName[1] === undefined ? true : sParameterName[1];
}
}
};
var staffName = getUrlParameter('staffName');
if (staffName != undefined) {
staffName = staffName.replace(/\+/g, " ");
$('[name="staff-name"]').val(staffName);
}
});
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.