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
    Feb 2005
    Location
    Bulgaria
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Problem with <table>

    Hi guys!
    First - excuse me for my bad english!
    Here is my problem:
    In my site I want to use a holl line in the table for hyperlink, but I made my site with frames, so I can't set(?) the line-hyperlink to open the document in another frame. Here is the code I used:
    Code:
    <tr bgcolor="#981B1E" onmouseover="Over(this)" onmouseout="Out(this)" height="30">
    <td onclick="self?.location='Link.html'"><font style="FONT-SIZE: 12px;COLOR: #FFFFFF;FONT-FAMILY: Verdana, serif;TEXT-DECORATION: none;">&nbsp;&nbsp;&nbsp;Text</font></td>
    </tr>
    Hope you'll understand me! Thanks in advance!

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,252
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Why Javascript?

    Why do you use Javascript for that and not an a element? You could simply use the target attribute to load the linked page in any named frame you wish.
    Regards,
    Ronald.
    ronaldvanderwijden.com

  • #3
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    or making a link in that td cell and set the css to display block
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Untitled Document</title>
    <style type="text/css">
    td.blockcell {
    height:50px;
    width:100px;
    }
    a.blocked,a.blocked:link,a.blocked:visited,a.blocked:hover,a.blocked:active {
    text-decoration:none;
    color:#FFFFFF;
    background:#000000;
    display:block;
    width:100%;
    height:100%;
    }
    a.unblocked,a.unblocked:link,a.unblocked:visited,a.unblocked:hover,a.unblocked:active {
    text-decoration:none;
    color:#FFFFFF;
    background:#000000;
    }
    </style>
    </head>
    <body>
    <table id="table1">
    <tr>
    <td class="blockcell"><a class="blocked" href="blah.com" target="blah">Text</a></td>
    </tr>
    <tr>
    <td class="blockcell"><a class="unblocked" href="anotherblah.com" target="blah">More Text</a></td>
    </tr>
    </table>
    </body>
    </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
    •