0

heres my code please someone help me to rectify it when i click on the button it opens the link in new tab and shift the focus on new tab but i want the focus to be remained on the original tab

  <a <?php if($offerlink != '') echo 'target="_blank"';?> href="<?php echo $offerlink; ?>" class="input button red secondary responsive toggle_coupon">
                                                <?php echo $button;?>
                                            </a>
                                            <span class="input button border high secondary responsive hidden_coupon">
                                                <?php echo $code;?>
                                            </span>
                                        <?php } 
                                        elseif($url != '') {
                                            $offerlink = home_url('/') . '?visit-offer=' . $post->ID; ?>
                                            <a target="_blank" href="<?php echo $offerlink; ?>" class="input button blue secondary responsive">
                                                <?php _e('Visit offer', 'Couponize');?>
                                            </a>
THe THuG
  • 71
  • 1
  • 10
  • possible duplicate of [How to stay on current window when the link opens in new tab?](http://stackoverflow.com/questions/7522565/how-to-stay-on-current-window-when-the-link-opens-in-new-tab) – Red Shift Jul 21 '15 at 16:58
  • i have already checked that thread it didn't helped thats why i posted here – THe THuG Jul 21 '15 at 17:02
  • Have you specifically tried to implement this: http://stackoverflow.com/a/7522634/3543350? – Red Shift Jul 21 '15 at 17:05

0 Answers0