
Originally Posted by
rlhanson
I did run into a couple of glitches as I was changing things.
When I added the images to select as a background, I lost the ability to go back and select a color.
So, what I did was make the color selection a drop down menu list, and then added "no image" to the buttons for the background images with a value of a clear pixel gif.
For some reason, if I just left the value as "transparent" it still would not allow the color change.
Anyway, it works this way to be able to go back and forth.
Take note of what I have said about stacking JS commands.
Give this an id so you can access it
HTML Code:
<input id=noImageRadio name="radiobutton" type="radio" tabindex="7" value="transparent" onClick="document.getElementById('cardTemplate').style.backgroundImage='url(../images/sp.gif)'" />
No Image <br />
and stack up some javascript
eg:
HTML Code:
<input name="radiobutton" type="radio" id="purple" value="#9900FF" tabindex="3"
onClick="document.getElementById('cardTemplate').style.backgroundColor=this.value;
document.getElementById('noImageRadio').checked=true;
document.getElementById('cardTemplate').style.backgroundImage='url(../images/sp.gif)';" />
Untested, but that is the general concept.
I put the JS commands on separate lines for reading purposes, but in code they need to be on the same line.