changing text color in layer

  • Started
  • Last post
  • 2 Responses
  • freekilly

    hello,
    I'm working on a site in DreamweaverMX.
    I would like to change the color of a text in a layer when the user rolls over an image in another layer Is this possible? I can understand most of javascript because i'm experienced in actionscript, I figure I can use a js. function to point to a certain layer or something likewise? please help.

  • ilmarine0

    you have to give and id atribute for the tag that encloses that text (ie. td, font, span, p, etc). and then say onmouseover document.all.layername.idname.st... = #blah. its pretty straightforward. there are two buts however. javascript has some problems with uppercase letters in colorcodes (incase you want to check for the color first) and if i remember correctly, then ns 4.7 had some problems with id-s and required name or something suchlike instead. do some googling.

  • freekilly0

    thanks! in the meantime I already figured a way out with the "Set Text Of Layer" behaviour, but the example path you gave helps me a lot, I allready knew you could target html-objects like that (it's called the DOM, right?), but not how...