Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Url link and mouseover function won work together

Status
Not open for further replies.

dreammaker888

Programmer
Jul 31, 2007
44
US
In the following block of code, I would like it to work:

1. When mouseover the line, display text.
2. When mouseout, hid text.

The above works.

3. When clicked, launch url link "yahoo.com".

The above is not working.

Can you have above work togethter.


Code:
<!-- CUSTOM TOOLTIP -->

<script language="JavaScript" type="text/javascript">
<!-- Copyright 2004, Sandeep Gangadharan -->
<!-- For more free scripts go to [URL unfurl="true"]http://www.sivamdesign.com/scripts/[/URL] -->
<!--
(document.getElementById) ? dom = true : dom = false;

function hideIt(add) {
  if (dom) {document.getElementById('layer'+add).style.visibility='hidden';}
  if (document.layers) {document.layers["layer"+add].visibility='hide';}
 }
function showIt(add) {
 if (dom) {
  if (document.getElementById('layer'+add).style.visibility=='visible') { hideIt(add); }
  else {document.getElementById('layer'+add).style.visibility='visible'} }

 if (document.layers) {
  if (document.layers["layer"+add].visibility=='show') { hideIt(add); }
  else {document.layers["layer"+add].visibility='show'}  }
 }
// -->
</script>

</head>

<body>
<?php

$layctr=1;


Echo '<div id="layer' . $layctr . '" style="position:relative; top:20px; left:180px; visibility:hidden; background-color: #FFFF99; border: 1pt single">';


echo '<table border="0" bgcolor="#FFFF99" cellpadding="2" cellspacing="0">';
echo ' <tr><td align="left"><font face="verdana, arial, helvetica, sans-serif" size="1">';
echo   'You could have the tooltip like this with light grey as the';
echo '<br /> background-color with your choice of font with border.';
echo   'You could have the tooltip like this with light grey as the';
echo '<br /> background-color with your choice of font with border.';
echo   'You could have the tooltip like this with light grey as the';
echo '<br /> background-color with your choice of font with border.';
echo ' </font></td></tr>';
echo '</table>';
echo '</div>';




echo[COLOR=red] '<font size="2"><a href="[URL unfurl="true"]http://www.yaho.com"[/URL] onMouseOver="showIt(' . $layctr . ')" onMouseOut="hideIt(' . $layctr . ')">[/color]<b>Links 1</b></a></font><br /><br /> ';
?>

Thanks.

DMK
 
You have an error in the URL:
Code:
[URL unfurl="true"]http://www.yaho[/URL][!]o[/!].com

Cheers,
Jeff

[tt]Jeff's Blog [!]@[/!] CodeRambler
[/tt]

Make sure your web page and css validates properly against the doctype you have chosen - before you attempt to debug a problem!

FAQ216-6094
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top