I actually want to pass a VARIABLE(that holds the name of the img tag) in
document.VARIAB LE.src=imga
when i try using document.arg.sr c=imga, there is an error
but when i see the value of arg it contains the name of the img tag
How can i correct this or is there any other way to do it, If anyone can do this by DOM it would be great
[HTML]<html>
<head><TITLE>Un iversal Engineers</TITLE>
<script language="javas cript">
function over(arg)
{
imga=new Image()
imga="images/bt2.gif"
document.n.src= imga
}
function out(arg1)
{
imgb=new Image()
imgb="images/rivet.jpg"
document.n.src= imgb
}
</script>
</head>
<body bgcolor=white>
<center>
<IMG SRC="images/ue.gif" border=0><br>
<IMG SRC="images/namaste1.bmp" border=0>
<table border=0>
<tr>
<td><IMG SRC="images/rivet.jpg" border=0 name=n alt="Profile" onMouseOver=ove r(this.name) onMouseOut=out( this.name)>
<td>
<td><IMG SRC="images/rivet.jpg" border=0 name=m alt="Flow" onMouseOver=ove r(this.name) onMouseOut=out( )>
<td>
<td><IMG SRC="images/rivet.jpg" border=0 name=o alt="Level" onMouseOver=ove r(this.name) onMouseOut=out( )>
<td>
<td><IMG SRC="images/rivet.jpg" border=0 name=p alt="Mass" onMouseOver=ove r(this.name) onMouseOut=out( )>
</tr>
</table>
</center>
</BODY>
</HTML>[/HTML]
document.VARIAB LE.src=imga
when i try using document.arg.sr c=imga, there is an error
but when i see the value of arg it contains the name of the img tag
How can i correct this or is there any other way to do it, If anyone can do this by DOM it would be great
[HTML]<html>
<head><TITLE>Un iversal Engineers</TITLE>
<script language="javas cript">
function over(arg)
{
imga=new Image()
imga="images/bt2.gif"
document.n.src= imga
}
function out(arg1)
{
imgb=new Image()
imgb="images/rivet.jpg"
document.n.src= imgb
}
</script>
</head>
<body bgcolor=white>
<center>
<IMG SRC="images/ue.gif" border=0><br>
<IMG SRC="images/namaste1.bmp" border=0>
<table border=0>
<tr>
<td><IMG SRC="images/rivet.jpg" border=0 name=n alt="Profile" onMouseOver=ove r(this.name) onMouseOut=out( this.name)>
<td>
<td><IMG SRC="images/rivet.jpg" border=0 name=m alt="Flow" onMouseOver=ove r(this.name) onMouseOut=out( )>
<td>
<td><IMG SRC="images/rivet.jpg" border=0 name=o alt="Level" onMouseOver=ove r(this.name) onMouseOut=out( )>
<td>
<td><IMG SRC="images/rivet.jpg" border=0 name=p alt="Mass" onMouseOver=ove r(this.name) onMouseOut=out( )>
</tr>
</table>
</center>
</BODY>
</HTML>[/HTML]
Comment