Forum Moderators: open
function getQueryVariable(variable) {
var query = window.location.search.substring(1);
var vars = query.split("&");
for (var i=0;i<vars.length;i++) {
var pair = vars[i].split("=");
if (pair[0] == variable) {
return unescape(unescape(pair[1]));
anything that has spaces between it will use a + instead of the space. I knew this was going to happen, I just have no idea on how to fix it. Any help please?
Am not aware of problem with + encoded spaces, but sister function encodeURIComponent converts space to %20.
Can you provide before/after example values. ?