School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 307,168 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,567 people online right now. Registration is fast and FREE... Join Now!




Dynamic Hexadecimal Colors not working in IE

 

Dynamic Hexadecimal Colors not working in IE

xheartonfire43x

25 Mar, 2009 - 07:06 AM
Post #1

D.I.C Regular
***

Joined: 22 Dec, 2008
Posts: 267



Thanked: 2 times
My Contributions
So I am still building a calendar and now I am trying to get categorized appointments. So I have a form where people can say "I want this category to be blue" and so it puts a hexadecimal character into the DB. (AKA blue = 0033FF, Red = CC0000, Orange = FF6600)., Probably is that in IE 8 ( the main browser that this app needs to work on) only shows either red or green. If the color is like orange or yellow it shows red. If it is blue it shows green. When I put the color in as static hexadecimal it works fine. The best part is that when it is green it shows maroon. So none of the colors at all work. I do a cfdump and the right hexadecmial code dumps. It doesn't show though.

CODE

        <cfloop index="x" from="1" to="#days#">
            <!---Create a variable for the current date so that it can be compared to the query--->
            <cfset thisdate = createdate(currentyear,currentmonth,x)>

            <!---If we are on the current day then highlight it in yellow--->
            
             <cfif x is currentday>
                    <td bgcolor="yellow" valign="top">
             <cfelse>
                    <td valign="top">
             </cfif>
                 <table width="100%" cellpadding="0" cellspacing="1" border="0">
                    <tr>
                        <td>
                            <!---Actually output the day #--->
                            <cfoutput>#x#</cfoutput>
                        </td>
                    </tr>
                    <!---Query the database and pull anything between the first day of the month and the last day--->
                    <cfquery name="getAppointments" datasource="#CRE_userdatabase#" username="#CRE_username#" password="#CRE_password#">
                        SELECT * FROM calendar WHERE startdate = '#dateformat(thisdate)#' ORDER BY starttime
                    </cfquery>
                    <!---If there are any events on this day then output them.--->
                    <cfif getAppointments.recordcount gt 0>
                        <cfloop query="getAppointments">
                            <cfif isDefined('getAppointments.category')>
                                <cfquery name="getCatColor" datasource="#CRE_userdatabase#" username="#CRE_username#" password="#CRE_password#">
                                    SELECT color FROM calendarcats WHERE catid = <cfqueryparam value="#getAppointments.category#">
                                </cfquery>
                            </cfif>
                            <cfoutput><tr><td width="100%" <cfif isDefined('getAppointments.category')>bgcolor="###getcatcolor.color#"</cfif>><cfdump var="#getcatcolor.color#">#getAppointments.subject#</td></tr></cfoutput>
                        </cfloop>
                    </cfif>
                </table>
             </td>
             <!---Add one to the counter--->
             <cfset counter = counter + 1>
             <!---If the counter hites 8 than the end of the week has been reached the row must end--->
             <cfif counter is 8>
                 </tr>
                    <!---If it isn't the end of the month then set the counter back to 1--->
                    <cfif x lt days>
                         <cfset counter = 1>
                         <cfoutput>
                         <tr>
                         </cfoutput>
                    </cfif>
             </cfif>
        </cfloop>



Any ideas?

This post has been edited by xheartonfire43x: 25 Mar, 2009 - 07:10 AM

User is offlineProfile CardPM
+Quote Post



Fast ReplyReply to this topicStart new topic

Time is now: 11/21/09 06:38PM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month