I'm sorry,
But I can't give you a straight answer (but it sounds like something
to do with the onMouseOut event of the TABLE cell).
This is one of the setbacks of always using someone else's code and
trying to make it work after your own desires.
What usually gets discussed in this forum are small parts of the
solution
that the programmer in question then tries with his whole solution.
First, you need to learn what all the code you have borrowed does,
and then pinpoint that specific part of the code.
Then you can post that code to this forum and hopefully get an answer.
Best regards,
Robert
-----Original Message-----
From: Harpreet [mailto:harpreet@c...]
Sent: den 14 mars 2003 17:45
To: JavaScript HowTo
Subject: [javascript_howto] RE: using mouseover to change a background
image
Thank you Robert for the code and it works just the way i wanted. But i
am having another problem. I do 2 things while at mouseover. One it
changes the image and second it shows a drop down menu. WHen i use ur
code and my drop down code it shows one thing at a time. when it is
mouseover it changes the image and when I move the mouse a little bit
the hand shows for the menu bar the original image comes.
Any idea what is missing. I am using the code
http://www.softcomplex.com/products/tigra_menu/ for the menu and
background is an image for the tabs.
Thanks
----- Original Message -----
From: "Robert Nyman" <robert.nyman@c...>
To: "JavaScript HowTo" <javascript_howto@p...>
Sent: Thursday, March 13, 2003 10:39 AM
Subject: [javascript_howto] RE: using mouseover to change a background
image
Ok...
Well, I'll give you code for an easy solution here.
<script>
function changeImg(oElm, strSrc){
oElm.background =3D strSrc;
}
</script>
<table>
<tr>
<td onmouseover=3D"changeImg(this,
'yourMouseOverImg.gif')" onmouseout=3D"changeImg(this, 'yourImg.gif')">
Your content </td> </tr> </table>
/Robert
-----Original Message-----
From: Harpreet [mailto:harpreet@c...]
Sent: den 13 mars 2003 16:37
To: JavaScript HowTo
Subject: [javascript_howto] RE: using mouseover to change a background
image
I got this code from the internet. It was used to change the image of an
<image tag using <table><tr><td onmouseover=3D"chkVer('go3','but5')"
onmouseout=3D"chkVer('go3','but4')"> <img NAME=3D"go3" border=3D"0"
SRC=3D"images\tab_off_devices.gif" WIDTH=3D"93"
HEIGHT=3D"24"></td></tr></table>
The above works.
But i want to use the above to change my background image . How can i do
this pleas ehelp.
<SCRIPT language=3D"javascript1.1">
if( document.images )
{
but4=3Dnew Image(344,120)
but4.src=3D"tab_off_devices.gif"
but5=3Dnew Image(344,120)
but5.src=3D"tab_on_devices.gif"
}
</script>
<script>
<!--
function chkVer(imagename,objectsrc)
{
var n=3Dnavigator.appName
var v=3DparseInt(navigator.appVersion)
var browsok=3D((n=3D=3D"Netscape")&&(v>=3D3))
var browsok2=3D((n=3D=3D"Microsoft Internet Explorer")&&(v>=3D4))
if ((browsok)||(browsok2))
document.images[imagename].src=3Deval(objectsrc+".src")
}
//-->
</script>
thanks.
----- Original Message -----
From: "Robert Nyman" <robert.nyman@c...>
To: "JavaScript HowTo" <javascript_howto@p...>
Sent: Thursday, March 13, 2003 2:25 AM
Subject: [javascript_howto] RE: using mouseover to change a background
image
Please supply the JavaScript code in the chkVer() function.
/Robert
-----Original Message-----
From: Harpreet [mailto:harpreet@c...]
Sent: den 13 mars 2003 05:39
To: JavaScript HowTo
Subject: [javascript_howto] using mouseover to change a background image
List members,
I am using the following to change my background image when I mouse over
a table cell. But it does not work. What am I missing.
<td nowrap align=3D"middle" width=3D"93"
background=3D"../images/tab_off_devices.gif" height=3D"24"
onmouseover=3D"chkVer('go3','but5')" onmouseout=3D"chkVer('go3','but4')"
name=3D"go3"></td>
Please help,
Thanks
---
Change your mail options at http://p2p.wrox.com/manager.asp or to
unsubscribe send a blank email to
---
Change your mail options at http://p2p.wrox.com/manager.asp or to
unsubscribe send a blank email to
---
Change your mail options at http://p2p.wrox.com/manager.asp or to
unsubscribe send a blank email to
---
Change your mail options at http://p2p.wrox.com/manager.asp or to
unsubscribe send a blank email to