Web Hosting Forum | Lunarpages
News: July 14, 2008 - New Contest! - Submit Your WordPress Theme Designs, Win BIG!
June 30, 2008 - Submit Your Site for the July 08 Site of the Month Award!
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
July 24, 2008, 11:52:14 PM


Login with username, password and session length


Pages: [1]   Go Down
  Print  
Author Topic: hyperlinking cell instead of just text  (Read 552 times)
fstjohn
Intergalactic Superstar
*****
Offline Offline

Posts: 169



WWW
« on: March 07, 2008, 08:32:52 AM »

I have a site with rollover cell color changes with text links inside the cells

here:
www.wamproductions.net

my client is a bit bummed about having to click the text with absolute precision and wants the entire area to be "clickable"

any ideas?
Logged

Jason2
Intergalactic Superstar
*****
Offline Offline

Posts: 161


WWW
« Reply #1 on: March 07, 2008, 08:34:10 AM »

Please could you post the current code you have.

Thanks!

Regards Jason Smile
Logged

"Anyone who has never made a mistake has never tried anything new." -- Albert Einstein
scanman20
Master Jedi
*****
Offline Offline

Posts: 1197



WWW
« Reply #2 on: March 07, 2008, 11:21:31 AM »

use javascript. put an onclick listener on the cell.
Logged

Even a broken clock is right twice a day.
NotOneBit.com
MCSE - MCSA - MCP
fstjohn
Intergalactic Superstar
*****
Offline Offline

Posts: 169



WWW
« Reply #3 on: March 07, 2008, 06:25:26 PM »

Please could you post the current code you have.

Thanks!

Regards Jason Smile

here's a portion of it,
Code:
        <tr>
          <td valign="middle" bgColor='#000000' class="cellbox" onmouseover="style.backgroundColor='#990000';"onmouseout="style.backgroundColor='#000000'"><a href="../outdoormovies.htm"><h1>Movies Under The Stars</h1></a></td>
          <td valign="middle" class="cellbox" bgColor='#000000' onmouseover="style.backgroundColor='#990000';"onmouseout="style.backgroundColor='#000000'"><a href="../funandgamesnight.htm"><h1>Fun &amp; Games Night</h1></a> </td>
          <td valign="middle" class="cellbox" bgColor='#000000' onmouseover="style.backgroundColor='#990000';"onmouseout="style.backgroundColor='#000000'"><a href="../duckderbyraces.htm"><h1>Duck Derby Day </h1></a></td>
          <td valign="middle" class="cellbox" bgColor='#000000' onmouseover="style.backgroundColor='#990000';"onmouseout="style.backgroundColor='#000000'"><a href="../townfairplanners.htm"><h1>Town Fairs</h1></a> </td>
        </tr>
      </table></td>
<br>
Logged

wektech
Jabba the Hutt
*****
Offline Offline

Posts: 686


WWW
« Reply #4 on: March 08, 2008, 06:28:38 AM »

One of the solutions would be to use embedded text image links (gifs with transparent backgrounds) instead of text links. Make sure to use alt and title text with the images to make up for loosing the links anchor text.
Logged

fstjohn
Intergalactic Superstar
*****
Offline Offline

Posts: 169



WWW
« Reply #5 on: March 08, 2008, 09:38:01 PM »

thanks, yeah - thats the way I handled it in the past, I'm trying to steer away from that way.

thanks though
Logged

rbrummett
Trekkie
**
Offline Offline

Posts: 16



WWW
« Reply #6 on: March 08, 2008, 10:47:40 PM »

Code:
<div id="mybox" onClick='location.href="http://www.google.com"'>

Just put that in a table cell instead of a div. Also, you should definitely write a function for it in Javascript then call it throughout your code. That way if you decide to change the url you only need to change it in one place instead of many more.
Logged

Friendship is like peeing on yourself: everyone can see it, but only you get the warm feeling that it brings. http://www.divinecomics.com
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM