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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

onMouseover dosent work

Status
Not open for further replies.

csniffer

Programmer
Apr 30, 2003
161
GB
can any of u see a problem with this script that i got out of a book. the link still works but there is no pic shown in the webpage, here is the funcs that i have after the head tag
Code:
<HTML>
<HEAD>
<SCRIPT language=&quot;JavaScript&quot;>
<!--
 if (document.images)
{
  pic1on= new Image(129,24);
  pic1on.src=&quot;pics/click.gif&quot;;
  
  pic1off= new Image(129,24);
  pic1off.src=&quot;pics/about_ses.gif&quot;;
}

function lightup(imgName) 
 {
  if (document.images)
   {
    imgon=eval(imgName + &quot;on.src&quot;);
    document[img]ame[/img].src= imgon;
   }
	
 }

function turnoff(imgName)
 {
  if (document.images)
   {
    imgoff=eval(imgName + &quot;off.src&quot;);
    document[img]ame[/img].src= imgoff;
   }
	
 }
//-->
</SCRIPT>

<TITLE>
JST
</TITLE>
</HEAD>

and this is the html that i use to call it and its all on one line

Code:
<a href=&quot;aboutses.php&quot; onMouseover=&quot;lightup('pic1')&quot; onMouseout=&quot;turnoff('pic1')&quot;> <IMG src=&quot;pics/about_ses.gif name=&quot;pic1&quot; width=&quot;129&quot; height=&quot;24&quot; border=&quot;0&quot;></a> </TD>

thx

To err is human, to completely mess up takes a computer. [morning]
 
ok sorry, found it. missed a speach mark of the <IMG src

To err is human, to completely mess up takes a computer. [morning]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top