vForums Support > Programming & Coding :: Code Requests & Support :: > Add Menu Buttons [Support]

Add Menu Buttons [Support] - Posted By Nick (nickb) on 20th Oct 08 at 7:05pm
In the Menu area you click on the website button it opens in the same window as the forum, I need it to open in a blank tab.

Code:
 
  1. <script>
  2. /*Add Menu Buttons
  3. Created By Wrighty
  4. support.virtualforums.co.uk*/
  5.  
  6. var menu = document.getElementById('welcome_table').getElementsByTagName('td')[2];
  7.  
  8. function do_menu(img_src,link){
  9. menu.innerHTML+= " :: <a href="+link+"><img src='"+img_src+"'  border=0></a>";
  10. }
  11.  
  12. do_menu('http://i185.photobucket.com/albums/x20/magedesigns/website-1.gif','http://fdestiny.webs.com/');
  13. </script>
  14.  
 


Thanks

Re: Add Menu Buttons [Support] - Posted By ashkir (ashkir) on 20th Oct 08 at 7:52pm
Find:
menu.innerHTML+= " :: <a href="+link+"><img src='"+img_src+"' border=0></a>";

Replace With:
menu.innerHTML+= " :: <a href="+link+" target=_blank><img src='"+img_src+"' border=0></a>";

Re: Add Menu Buttons [Support] - Posted By Nick (nickb) on 21st Oct 08 at 5:13am
Thanks it worked {Smile}