I created a query string and appended it to the URL like so:
// HTML from index.html
<input type="button" value="Yes" onclick="redirect(this);" id="YES" class="btn btn-primary btn-lg">
<input type="button" value="No" onclick="redirect(this);" id="NO" class="btn btn-primary btn-lg">
// JS on index.html
function redirect(e){
var mapPg = "map.html";
var qString = "?choice=";
location.href = mapPg + qString + e.id;
}
Beginning on the map.html page, I want to take that query string and carry it through to every URL, except the index.html page.
When the user clicks on price.html pg, it'll use the query string to call a function that will pull in the data for the "yes" answer. Same thing goes for the "no" answer.
I can't figure out how to append the query string to the URL of every pg on click.
The nav is a JavaScript include that's been pulled in. I've added a class of qString to all the<a> in the nav in case it would be easier to target them.