Hy guys, I’m writing from Brasil hoping someone could help me out in this.
Here’s the deal:
I need to change the link color of some links inside a table dynamically, with a value retrieved from a textbox. It works like this: the user clicks a link that opens a pop-up with a color picker, and when he chooses the color, the rgb value of the color apears in the textbox. I have a button on the form that triggers the event onClick to change the color of the links inside a table in the same page. I made it work to change the bgcolor of the table, with this:
function changebg() {
document.all.TableName.style.backgroundColor = document.FormName.textBoxName.value;
}
But I need a function that makes the link (not text!) color change, not the bgcolor.
Is there a way to change the value of a class attribute assigning a value to it retrieved from a text input ? Can I do that with all attributes inside a class, like backgroud-image url, and if yes, how can I change it’s attributes onhover ?
Sorry about the several of questions, but I’m crazy with this.
Can someone help me out ?