Coldfusion Sample Code
Notice! The code snippet below is a basic example of how to implement the new logos within Coldfusion.
Replace <cfifimg src="images/OLD_LOGO_NAME.png">
with your current HTML code for the logo. Then replace <cfifimg src="images/NEW_LOGO_NAME.png">
with the updated code for the new logo.
On July 1st, the new logo will automatically appear in lieu of the old logo until you have time to go back and remove the old logo altogether.
<cfset comparison = DateCompare("06/27/2013", Now(), "d")>
<cfoutput>
<cfif comparison LTE 0>
<img src="images/NEW_LOGO_NAME.png">
<cfelse>
<img src="images/OLD_LOGO_NAME.png">
</cfif>
</cfoutput>
Javascript Sample Code
Notice!
If you choose to use Javascript please remember to add the id
attribute to the HTML <img>
tag and set the getElementById
below using the value of your new image id
attribute.
Finally, replace PATH_TO/NEW_LOGO.png
with the path to the new logo you are using.
var logo = document.getElementById("logo");
if(new Date() >= new Date(2013, 5, 27, 0, 0, 0, 0)) {
for(n in logo.attributes) {
if(typeof logo.attributes[n] != "undefined" && typeof logo.attributes[n].name != "undefined" && logo.attributes[n].name == "src") {
logo.attributes[n].value = "PATH_TO/NEW_LOGO.png";
}
}
}