I am a beginner HTML and I am having trouble putting my idea into the right syntax. I have the following HTML snippet:
<div id="footerterms"><span class="mainsmaller"><a href="/privacy.jsp">Privacy</a> | <a href="/terms_of_use.pdf">Terms of Use</a> | <a href="/sitemap.jsp">Site Map</a></span></div>
What I am trying to do is to have them open in a new tab whenever the user is on a specific page.
I figured that having a boolean
is a fair way to do it. I wrote the code below, but it seems that the syntax is off.
<var showIt=true;>
<% showIt = Request.ServerVariables("URL") == "payment.jsp" %>
<% if(showIt){ %>
<div id="footerterms"><span class="mainsmaller"><a href="/privacy.jsp" target="_blank" >Privacy</a> | <a href="/terms_of_use.pdf" target="_blank" >Terms of Use</a> | <a href="/sitemap.jsp" target="_blank" >Site Map</a></span></div>
<% }else{ %>
<div id="footerterms"><span class="mainsmaller"><a href="/privacy.jsp">Privacy</a> | <a href="/terms_of_use.pdf">Terms of Use</a> | <a href="/sitemap.jsp">Site Map</a></span></div>
<% } %>