//Get width and resize another element
$(document).ready(function() {
function ResizeSearch(GridID, SearchID) {
var eleWidth = $("#" + GridID).width();
$("#" + SearchID).width(eleWidth);
}
$("#getp").click(function() {
ResizeSearch("<%= gvValidStatus.ClientID %>", "ValidStatusSearch");
});
});
This is a simple question for a lot of you stackoverflow people. I've got a little bit of code that looks like this:
var www = '?points=City%20Chairman%20Brutas&another=test';
var name = 'points';
var match = RegExp(RegExp('[?&]' + name + '=([^&]*)').exec(www)[1]);
match = decodeURIComponent(match);
match = match.replace('\/','');
document.write(match);
The code is pretty straight forward, for jsfiddle purposes I made a var instead of using window.location.search. I understand that I NEED to make match.replace GLOBAL for this to work correctly. It currently outputs this:
City Chairman Brutas/
If I change match.replace to match.replace('\//g',''); it doesn't work.
Output of above: /City Chairman Brutas/
I know I'm close, if anybody could point me in the right direction that would be awesome.