View Full Version : Probelm with menu opening new browser

06-18-2004, 07:07 PM
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

<script language="JavaScript">
function toonmenu(elmnt)
function verstopmenu(elmnt)

<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 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 -->
<tr><td class="menu"><a href="{U_PRIVATEMSGS}" class="mainmenu">{PRIVATE_MESSAGE_INFO}</a></td>

<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;</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>

<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>

06-18-2004, 10:16 PM
This is nothin to do with php

06-18-2004, 10:23 PM
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.