Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jun 2004
    Location
    UK
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Probelm with menu opening new browser

    I have just started with PHP, although I do have a background of VB.

    I found some java code on another web site which was what I wanted to use for my menus on my forum. I played about a bit with it to change it to suit my needs and came up with the below code.

    The problem I don't know how to solve, is that, although the menu works, it opens up a new browser for each menu item, instead of doing it in the same browser, as if using the menu on this forum.

    My forum is phpBB V.208

    I hope this makes sense. :D

    PHP Code:
    <script language="JavaScript"
          function 
    toonmenu(elmnt
          { 
          
    document.all(elmnt).style.visibility="visible" 
          

          function 
    verstopmenu(elmnt
          { 
          
    document.all(elmnt).style.visibility="hidden" 
          

          
    </script> 

          <table width="100%" border="1" bordercolor="#330099"> 
          <tr bgcolor="#E8EEFF" height="25"> 
          <td onmouseover="toonmenu('menu1')" onmouseout="verstopmenu('menu1')" class="mainmenu" width="25%"> 
          <a href="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Membership Details&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a><br />        
          <table class="menu" id="menu1" width="100%" border="1"  bgcolor="#DDE6FF" bordercolor="#330099"> 
           
          <tr><td><a href="{U_MEMBERLIST}" class="mainmenu">Members</a></td></tr> 
          <tr><td class="menu"><a href="{U_GROUP_CP}" class="mainmenu">{L_USERGROUPS}</a></td></tr> 
          </td>       
       </td> 
          </tr> 
       </table> 
          <td onmouseover="toonmenu('menu2')" onmouseout="verstopmenu('menu2')" class="mainmenu" width="25%"><a href="blank">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Personal Details&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a><br /> 

          <table class="menu" id="menu2" width="100%" border="1"  bgcolor="#DDE6FF" bordercolor="#330099">       
           
          <tr><td class="menu"><a href="{U_PROFILE}" class="mainmenu">View Your Profile</a></td></tr> 
          <tr><td class="menu"> 
          <!-- BEGIN switch_user_logged_in --> 
          <a href="{U_CONTACT_MAN}" class="mainmenu">Contact Management</a> 
          <!-- END switch_user_logged_in --> 
          </td></tr> 
          <tr><td class="menu"><a href="{U_PRIVATEMSGS}" class="mainmenu">{PRIVATE_MESSAGE_INFO}</a></td> 
          </table> 

          <td onmouseover="toonmenu('menu3')" onmouseout="verstopmenu('menu3')" class="mainmenu" width="25%"><a href="blank">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
          &nbsp;&nbsp;&nbsp;Facilities&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
          &nbsp;</a><br /> 

          <table class="menu" id="menu3" width="100%" border="1"  bgcolor="#DDE6FF" bordercolor="#330099">       
          <tr><td><a href="{U_FAQ}" class="mainmenu">{L_FAQ}</a></td></tr> 
          <tr><td><a href="{U_SEARCH}" class="mainmenu">{L_SEARCH}</a></td></tr> 
          <tr><td><a href="{U_CALENDAR}" class="mainmenu">Calendar</a></td></tr>    
          <tr><td><a href="http://www.deftechsolutions.co.uk/forum/task.php" class="mainmenu">To Do List</a></td></tr> 
          </table> 

          <td onmouseover="toonmenu('menu4')" onmouseout="verstopmenu('menu4')" class="mainmenu" width="25%"><a href="blank">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
          &nbsp;Login Details&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
          &nbsp;&nbsp;&nbsp;</a><br /> 

          <table class="menu" id="menu4" width="100%" border="1"  bgcolor="#DDE6FF" bordercolor="#330099"> 
          <tr><td class="menu"> 
          <!-- BEGIN switch_user_logged_out --> 
          <a href="{U_REGISTER}" class="mainmenu">{L_REGISTER}</a></span> 
          <!-- END switch_user_logged_out --> 
          <a href="{U_LOGIN_LOGOUT}" class="mainmenu">{L_LOGIN_LOGOUT}</a> 
          </td>       
          </table> 
       </table> 
       </td>           
    </tr> 
    </table> 

  • #2
    Senior Coder Nightfire's Avatar
    Join Date
    Jun 2002
    Posts
    4,266
    Thanks
    6
    Thanked 48 Times in 48 Posts
    This is nothin to do with php

  • #3
    raf
    raf is offline
    Master Coder
    Join Date
    Jul 2002
    Posts
    6,589
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Welcome here!

    As Nightfire said : tis is not a PHP issue, because it's a clientside action. PHP can not open a new window. I don't immedeately see i your code whats causing the links to open in another window, but i think you left of some code that might explain it.
    Posting guidelines I use to see if I will spend time to answer your question : http://www.catb.org/~esr/faqs/smart-questions.html


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •