Miscellaneous

Add Parameter to URL – JQUERY

Add Parameter to URL – JQUERY function addOrUpdateUrlParam(name, value) { var href = window.location.href; var regex = new RegExp(“[&\\?]” + name + “=”); if(regex.test(href)) { regex = new RegExp(“([&\\?])” + name + “=\\d+”); window.location.href = href.replace(regex, “$1” + name + “=” + value); } else { if(href.indexOf(“?”) > -1) window.location.href = href + “&” + […]

Miscellaneous

JQUERY setLocale Errors

A number of JQUERY plugins can throw up syntax errors after setting setlocale(“LC_ALL”,XXX.utf8)   Make sure you change back the LC_NUMERIC variable;   setlocale (LC_ALL, $language); setlocale(LC_NUMERIC, ‘C’);