View Full Version : Problem with frames and hyperlinks

11-19-2002, 09:59 AM
Hy all
My site design consists of top frame and main(bottom) frame. I am trying to create a navigation menu made of hyperlink texts in the top frame. The hyperlink text changes font color when onclick event occurs. My problem are two:
1) when the user clicks another hyperlink text in the top frame, the previous hyperlink text should change to its original color (white) and the clicked hyperlink text should change its font color(red). This way the users on the site know where they are on the site.
2)each top link opens a new page in the main/bottom frames in each of those pages there are links, if the user clicks on those links the hyperlink text color in the top frame should not change.

I tried to wrote the code looking some examples but it doesn't work. I want the code to work in atleast IE 5.0, 5.5 and 6.0 browsers.

this is the top frame code (the style is an include file and it defines the text colors):

<!--#INCLUDE file="style.htm"-->
function highlight()
var oObj = event.srcElement
oObj.style.color = "red" ;

<body topmargin="0" leftmargin="0" background="images/bgTop.gif">
<table border="0" bordercolor="red" cellpadding="0" cellspacing="0" width="100%" >
<!-- tr-logo tr-->
<td width="100%" height="55" >
<table border="0" bordercolor="yellow" cellpadding="0" cellspacing="0" width="100%" style="text-align:right">
<td valign="top"><IMG SRC="images/Logo.gif" border="0" height="55" width="240"></td>
<td bgcolor="white"></td>
<!--end of the tr-->
<!--beginning of the menu tr-->
<tr height="21">
<td width="100%">
<table border="0" bordercolor="#D6CFD6" align="center" cellpadding="0" cellspacing="0" width="98%" height="21">
<td height="21" nowrap><a href="CreateCompany.asp" target="Screen" class="headermenu" id="1" onclick="highlight(); ">Providers |</a></td>
<td height="21" nowrap><a href="CreateRoom.asp" target="Screen" class="headermenu" id="2" onclick="highlight(); ">Rooms |</a></td>
<td height="21" nowrap><a href="CreateModerator.asp" target="Screen" class="headermenu" id="3" onclick="highlight();">Moderators |</font></a></td>
<td height="21" nowrap><a href="CreateAutomaticModerator.asp" target="Screen" class="headermenu" id="4" onclick="highlight();">Moderator Policies |</a></td>
<td height="21" nowrap><a href="CreatePresenter.asp" target="Screen"class="headermenu" id="5" onclick="highlight();">Presenters |</a></td>
<td height="21" nowrap><a href="CreateConference.asp" target="Screen" class="headermenu" id="6" onclick="highlight();">Conference Scheduling |</a></td>
<td height="21" nowrap><a href="CreateConferenceTemplates.asp" target="Screen" class="headermenu" id="7" onclick="highlight();">Conference Templates</a></td>
<!--end of the menu tr-->


11-19-2002, 10:02 AM
sorry- i'm in the wrong forum