I am passing a querystring from my previous page to this page and then i want to pass it to the next page, but it isn't working.
<script type="text/javascript">
function qs(search_for) {
var query = window.location.search.substring(1);
var parms = query.split('&');
for (var i=0; i<parms.length; i++) {
var pos = parms[i].indexOf('=');
if (pos > 0 && search_for == parms[i].substring(0,pos)) {
return parms[i].substring(pos+1);;
}
}
return "";
}
</script>
here is the link
<a href="http://www.TEST.com/TEST/TEST/TEST.aspx?comp=" & <script type="text/javascript"> document.write(qs("comp")); </script> & "name=test" >CLICK HERE </a></font></b></p>
<a>tag? What are those ampersands supposed to do, or mean? Maybe that's some kind of weird ASP thing, but I can't imagine any way that that's going to work.