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 2 of 2
  1. #1
    New Coder
    Join Date
    Nov 2002
    Location
    Israel
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Problem with frames and hyperlinks

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

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

    //-->
    </script>
    </head>
    <body topmargin="0" leftmargin="0" background="images/bgTop.gif">
    <table border="0" bordercolor="red" cellpadding="0" cellspacing="0" width="100%" >
    <!-- tr-logo tr-->
    <tr>
    <td width="100%" height="55" >
    <table border="0" bordercolor="yellow" cellpadding="0" cellspacing="0" width="100%" style="text-align:right">
    <tr>
    <td valign="top"><IMG SRC="images/Logo.gif" border="0" height="55" width="240"></td>
    <td bgcolor="white"></td>
    </tr>
    </table>
    </td>
    </tr>
    <!--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">
    <tr>
    <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>
    </tr>
    </table>
    </td>
    </tr>
    <!--end of the menu tr-->
    </table>
    </body>
    </html>



    Thanks

  • #2
    New Coder
    Join Date
    Nov 2002
    Location
    Israel
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts

    sorry- i'm in the wrong forum

    sorry- i'm in the wrong forum


  •  

    Posting Permissions

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