Jump to content

Change Row Color and Use row as url


brown2005

Recommended Posts

echo'    <tr onmouseover="ChangeColor(this, true);" onmouseout="ChangeColor(this, false);" onclick="DoNav('.$config_website_url.'/'.$config_website_url_topic.'/files/url.php?id='.$adverts_id.');">
          <td align="center" class="text_bold" height="25">'.$rankStr.'</td>
          <td align="center" class="text_bold"><a href="'.$config_website_url.'/'.$config_website_url_topic.'/files/url.php?id='.$adverts_id.'" class="blue_bold_none" target="_blank">'.$adverts_link.'</a></td>
          <td align="center" class="text_bold">£ '.$adverts_link_amount.'</td>          
        </tr>';

i have that code, which the color changes fine but the <tr> click to new link doesnt... basically wat i want to do is take the link from

<a href="'.$config_website_url.'/'.$config_website_url_topic.'/files/url.php?id='.$adverts_id.'" class="blue_bold_none" target="_blank">'.$adverts_link.'</a>

and add it to the row, so when u click anywhere in row it goes to the page..

ne help would be much appreciated...

thanks in adance.. o and currently i have

function DoNav(theUrl)
{
document.location.href = theUrl;
}
Link to comment
https://forums.phpfreaks.com/topic/29905-change-row-color-and-use-row-as-url/
Share on other sites

hi i have the row color sorted now, but i want to be able to add <a></a> behind a whole <tr></tr> and not just a link...

ne ideas please?

<a href="'.$config_website_url.'/'.$config_website_url_topic.'/files/url.php?id='.$adverts_id.'" class="blue_bold_none" target="_blank">'.$adverts_link.'[/url]

thats what i want in the row..
here, what you want to do can actually be done by html codes:
[code]
<table>
<tr bgcolor="#E9967A"><a href="index.html"><td><b>To:</b></td><td>tetaa9peohawpghpgeppaheppeahe</td></tr>
</table>
[/code]
replace the random text or add <td></td> to your own comforts.
hoped it helped
Ted :D

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.