Anchors in FAQ's Open New Windows

    • May 1, 2018 at 8:06 am #1169

      Hello everyone,

      I have a FAQ that I wanted to have anchors in. I have them working and linking properly to each anchor. However, every time I click on an anchor. It opens a new window. If I’m in the admin section and preview the faq. The links do not open in new window. I’m sure it must be a difference in the code for the public side versus the admin side. I haven’t been able to narrow down the difference yet.

      If you have any feedback on what would fix this. Please let me know.

    • June 6, 2018 at 12:35 pm #1275

      Sorry @jranshaw, I didn’t see your message right now.

      I’m not sure what could be causing this. It may be an osTicket (rather than and osTicket Awesome) glitch, so you may want to try asking in their forums.

      But here is something that comes to mind that you can try.

      You could try specifically coding your links like so:

      <a href="#anchor" target="_self">Anchor Link</a>

      This wouldn’t normally be necessary, as _self is always the default. _self tells the browser to open the link in the same window, whereas _blank tells the browser to open the link in a new window (more info).

      Perhaps this workaround will override whatever is going on in your FAQ’s. I hope that it does.

    • June 6, 2018 at 12:49 pm #1284

      Thanks Stevland,

      ]I actually figured out that it was a js file. I tried what you said also and it didn’t work. This might not be ideal solution but it worked.
      Line 2 in faq.php added
      $disableHeaderosTicketJS = 1;

      Line 47 in header replaced
      <script src=”<?php echo ROOT_PATH; ?>js/osticket.js”></script>

      <script type=”text/javascript” scr=”<?php if($disableHeaderosTicketJS == 1){ echo “”;}else{ echo “<?php echo ROOT_PATH; ?>js/osticket.js”;}?>”> </script>

    • June 6, 2018 at 1:14 pm #1293

      Whoa… you’ve modified osTicket’s core functionality. Aside from that I have no clue what you did, how you figured it out or what potential ramifications you may experience as a result. BUT I’m glad that you found a solution! 🙂

      This is probably already apparent to you, but in case you haven’t thought of it…

      Keep in mind that if/when you update osTicket / osTicket Awesome you will have to recode this hack.

      All the best!

You must be logged in to reply to this topic.

Topic Tags