Retain Query String In URL -


i've built web app lives on sharepoint.

the user asked question @ beginning. can answer either "yes" or "no."

a query string added url depending on user's answer. there 2 query strings: ?choice=yes or ?choice=no.

the index.html page has this:

<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"> 

and how query string added:

function redirect(e){      location.href = "map.html?choice=" + e.id;  } 

after user picks answer takes them map.html, first section user comes question (so url @ point can either map.html?choice=yes or map.html?choice=no). after that, can navigate ever please on app.

here's issue. navigation being pulled in external nav.js file (i.e. js include) so:

<script type="text/javascript" src="/js/nav.js"></script> 

here's nav.js code:

document.write( '   <div class="row text-center navigation">' + '     <ul class="nav nav-pills">' + '      <li id="nav-welcome"><a class="align" href="index.html">welcome</a></li>' + '      <li id="nav-map"><a href="map-uor.html"><span>map</span></a></li>' + '      <li id="nav-about"><a href="annual-passes-flrap.html"><span>about</span></a></li>' + '      <li id="nav-contact"><a href="tickets-express.html"><span>contact</span></a></li>' + '      <li id="nav-pricing"><a href="park-tickets01.html"><span>pricing</span></a></li>' + '    </ul>' + '   </div>' ); 

how continue pass either query string user continues navigate app?

there single page who's content change depending on query string.

so if user answers "yes" @ beginning , navigates pricing page, pull content specific "yes" answer (i.e. call specific function).

if user answers "no" @ beginning , navigates pricing page, pull content specific "no" answer (i.e. call specific function).

thank in advance.


Comments

Popular posts from this blog

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -