My problem in a nutshell is that I need to disable certain hyperlinks perhaps... by removing the a tag's href attribute
based on the contentents of a variable (either php or Javascript )
I have a navbar that when clicked loads in pages of content via a main loader page index.php
Depending on what button is clicked I would like to disable one or more of the other navbar buttons while on that page.
Say I add a variable to each page containing a number page_var = 1, page_var = 2, ETC
Then within each hyperlink button I add something like the following which I tried but didn't work -
onClick='if(page_var==2(this.disabled)){ return false; } else { this.disabled = true; }'
Can someone help me to find the proper syntax to achieve this?
Navbar buttons (hyperlinks)
<div class="square_wrap">
<a href="https://www.facebook.com/" title="Health Facebook page" target="_blank">
<div class="square square1">
<div class="icontext">Like Us On Facebook</div>
</div>
</a>
<a href="index.php?var=var&title=MHAP+-+Forward+This+Page&page_var=<?php if(isset($page_details)){ echo $page_details;} ?>">
<div class="square square3"><div class="icontext">Forward This Page</div>
</div>
</a>
<a href="index.php?var8=var8&title=MHAP+-+Give+Feedback" title="Feedback Form" target="_self" disabled="disabled">
<div class="square square4"><div class="icontext">Give Feedback</div>
</div>
</a>
</div>