Try a function like this: 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 pair[1]; } } };
var done = getQueryVariable('search_done'); // => 1 (http://www.webdeveloper.com/forum/archive/index.php/t-90289.html) On Apr 2, 2:58 am, heohni <heidi.anselstet...@consultingteam.de> wrote: > Hi, > > I have at a certain moment this in my address bar: .....search.php? > search_done=1......... > I need to extract the "search_done" because I want to pass this to a > function which should check if search_done equals 1 or not. > Anbody with a hint for me? > > Thanks