i am new to java script but, have a good understanding of html. I need a script that allows mouseover to change image and display a description in another table cell. I have looked on the free sites and have found one that works with a text url and i tried adapting but its beyond me at the moment :-)
Comments
: i am new to java script but, have a good understanding of html. I need a script that allows mouseover to change image and display a description in another table cell. I have looked on the free sites and have found one that works with a text url and i tried adapting but its beyond me at the moment :-)
:
This should do it.
[code]
function Img1Over() {
td1.innerText="here's the new text"
img1.src="new.gif"
}
function Img1Out() {
td1.innerText="here's the original text"
img1.src="nrm.gif"
}
tburcham
: : i am new to java script but, have a good understanding of html. I need a script that allows mouseover to change image and display a description in another table cell. I have looked on the free sites and have found one that works with a text url and i tried adapting but its beyond me at the moment :-)
: :
:
: This should do it.
:
: [code]
:
:
: function Img1Over() {
: td1.innerText="here's the new text"
: img1.src="new.gif"
: }
:
: function Img1Out() {
: td1.innerText="here's the original text"
: img1.src="nrm.gif"
: }
:
:
:
:
:
:
:
:
: [/code]
:
: tburcham
:
Thanks that is a great help
That works great thanks. Only one thing, is it possible to add formatting to the text that apears ie: font, size, colour and get it to be centre of the cell?
thanks again in anticipation to any answer.
Chris
: That works great thanks. Only one thing, is it possible to add formatting to the text that apears ie: font, size, colour and get it to be centre of the cell?
: thanks again in anticipation to any answer.
:
: Chris
:
Just replace the "innerHTML" instead of the "innerText" like:
[code]
function Img1Over() {
td1.innerHTML="here's the new text"
img1.src="new.gif"
}
function Img1Out() {
td1.innerHTML="here's the original text"
img1.src="nrm.gif"
}
You have to know how to combine single and double-quotes or
you'll have errors.
tburcham
Many thanks again, that works a treat!
Chris
[code]
[/code]
: i am new to java script but, have a good understanding of html. I need a script that allows mouseover to change image and display a description in another table cell. I have looked on the free sites and have found one that works with a text url and i tried adapting but its beyond me at the moment :-)
:
:
:
;-)
-mac-
mailto:programmersheaven@mac-doggie.nl
the Netherlands...