John-Marc - you are a very smart man.... I needed some time to get myself geared on a definate path with a clear goal (which you knew
)! LOL
I could not for the life of me get the hidden input to work and THEN, I figured out we/I was missing a single quote. So, here is the code that is actually working and passing the correct information with my form submission:
HTML Code:
<input name="background" type="hidden" id="background" />
<IMG src="images/rgbblue_sm.jpg" style="cursor:pointer" onclick="document.getElementById('cardTemplate').style.backgroundImage='url(images/rgbblue.jpg)';document.getElementById ('background').value=this.src;" />
<IMG src="images/yellow_sm.jpg" style="cursor:pointer" onclick="document.getElementById('cardTemplate').style.backgroundImage='url(images/yellow.jpg)';document.getElementById ('background').value=this.src;" />
<IMG src="images/red_sm.jpg" style="cursor:pointer" onclick="document.getElementById('cardTemplate').style.backgroundImage='url(images/red.jpg)';document.getElementById ('background').value=this.src;" />
My new goal:
- Assign particular layouts for particular backgrounds. This includes assigning classes for font color (currently white or black - can be expanded later on).
- Once a layout selection is made, then the user arrives on the page with the form fields for that particular layout.
- Once there, the user can change backgrounds all they want and keep the entries in the form BUT won't be able to change the layout (until I learn how to do that crazy stuff with the php choices!
)
Well?