help!! I need a script: image, mouseover, description

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

  • [b][red]This message was edited by tburcham at 2003-1-9 12:48:39[/red][/b][hr]
    : 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"
    }

    description
    Here's the original text
    [/code]

    tburcham
  • : [b][red]This message was edited by tburcham at 2003-1-9 12:48:39[/red][/b][hr]
    : : 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"
    : }
    :
    :
    :
    :
    : :

    : description
    :
    Here's the original text
    :
    :
    : [/code]
    :
    : tburcham
    :


    Thanks that is a great help
  • [b][red]This message was edited by chris101010 at 2003-1-10 7:23:48[/red][/b][hr]
    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


  • : [b][red]This message was edited by chris101010 at 2003-1-10 7:23:48[/red][/b][hr]
    : 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"
    }

    description
    here's the original text
    [/code]

    You have to know how to combine single and double-quotes or
    you'll have errors.

    tburcham
  • tburcham

    Many thanks again, that works a treat!

    Chris
  • Here a piece of code I let my PHP script create to display a menu:
    [code]
    Home Wachtwoord wijzigen Gebruikers en groepen Paginas en menus Muteer Agenda Wijzig persoonlijke pagina Logout

    [/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...


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories