I think I've either misunderstood or missed something fundamental about grouping elements together.
Here's what I want to do...
The user picks a colour from a chart and depending on what radio button is checked the colour is applied to that set of elements. It works fine for the background colour, and links but have a few problems with a couple of other things.
I'd like headings, subheadings and, for want of a better phrase I call, emphasized text to be user definable. At the moment I've called each section of text by different IDs. So I've got <H3 ID="SubHd1"> <H3 ID="SubHd2"> and so on. The JavaScript to change the colour uses lines like
document.getElementById("SubHd1"
.style.color=clrnum;
document.getElementById("SubHd2"
.style.color=clrnum;
and so on. I'm sure there is a better way of grouping these elements together rather that doing this, but I can't find it. At the moment I have to keep track of how many elements of each type I'm writing.
Also, when the forground colour radio button is checked ALL the text changes to the new picked colour.
You can see what I mean and what is happening more clearly at
Any and all suggestions are most welcome.
Ray
Here's what I want to do...
The user picks a colour from a chart and depending on what radio button is checked the colour is applied to that set of elements. It works fine for the background colour, and links but have a few problems with a couple of other things.
I'd like headings, subheadings and, for want of a better phrase I call, emphasized text to be user definable. At the moment I've called each section of text by different IDs. So I've got <H3 ID="SubHd1"> <H3 ID="SubHd2"> and so on. The JavaScript to change the colour uses lines like
document.getElementById("SubHd1"
document.getElementById("SubHd2"
and so on. I'm sure there is a better way of grouping these elements together rather that doing this, but I can't find it. At the moment I have to keep track of how many elements of each type I'm writing.
Also, when the forground colour radio button is checked ALL the text changes to the new picked colour.
You can see what I mean and what is happening more clearly at
Any and all suggestions are most welcome.
Ray