Problem setting variables after initial page load
So, I'm pretty new to ColdFusion and hoping this is an easy fix. I have a .cfm page that opens from several different points in a website. Depen
ding on which point it opens from, the variables room and activebutton are assigned different values via an onclick event. Based on these values, the room variable sets a background image for a div and the activebutton sets the textcolor for a different div via a stylesheet in the head of the document. Now, this part works fine with the following code in the stylesheet in the documents head:
#fp_r1_c2 {
background-image:url('images/<cfoutput>#room#</cfoutput>');
width:599px;
height:577px;
float:left;
}
#<cfoutput>#activebutton#</cfoutput>
{
color:#FFF;
}
Heres where things get hairy. After I have those initial variables set there are 6 divs (the ones that activebutton changes the color attribute of) that the user can click on. When any div is clicked its color should set to #FFF and whatever div was previously selected should change back to the default color for the page. In addition, the background-image attribute of the other div that was set by the room variable must change to a new image that corresponds to each button.
I've tried several methods, most of which I probably messed up anyhow. But I'm completely stumped how to accomplish this. Researching online has shown me that I can't include the new values in any kind of onclick command...so how exactly should I go about accomplishing what I need done?
Tthanks in advance for any assistance!
