Google logo

Google Calendar Link Plugin Released

Finally! Google Calendar Link Plugin Released!

Another Small Simple WordPress Plugin: Google Calendar Link Plugin is now ready for download. To see the plugin in action and to get more information just go under the WordPress Plugins menu and Click on Google Calendar Link Plugin. In order to download the plugin, just register at our website and then go to the Plugins Download Page. From this page you can download any of our Small Simple WordPress Plugins.

Blog, PHP, Web Development, WordPress,
Pantheon Logo

Pantheon – The Next Generation of WordPress hosting

Anybody in the WordPress design or development world has probably heard of Drupal and when you think of Drupal you think of Pantheon. Well, Stop The Clock! Pantheon now has the platform framework for WordPress. Now, WordPress developers and designers can concentrate on building plugins, creating themes and let Pantheon worry about dealing with all of the complexities of hosting. Coming from a job where I worked on Drupal and WordPress websites, I knew the greatness of Pantheon. So when I heard that Pantheon was going to support WordPress, I was excited! Now, I strictly work on WordPress and have been able to become one of the first WordPress developers to join Pantheon and I would like to tell you about Pantheon from a WordPress developers prospective.

Pantheon provides many different pricing options: Free plan(Developer Sandbox): You can get a Pantheon account, create your WordPress sites and start coding. Now, if you want to have a custom domain you will have to upgrade to a paid plan. Paid plans range from personal, all the way to some major Enterprise plans. So from small to large, Pantheon can handle it.

So after you create an account you can log in to your dashboard and start spinning up your WordPress sites. You can create a Brand New site or import an existing WordPress site.

 

Now after you have your site up and running you will be in your development environment.

 

So your website will begin in development mode, then you will push it to the testing environment and then when your website is ready, Go Live! Pantheon comes with a host of cool features and options. Pantheon supports GIT and SFTP. So if you are a GIT person, you are in luck. If you still have not yet took the leap into GIT, you can still use a FTP client(like FileZilla) that supports SFTP. Just drag and drop your files from your local to your pantheon server. Or, if you have an editor that allows connection to remote sites, you can connect directly to your Pantheon server. Pantheon also keeps you informed of your GIT commit status.

 

As a WordPress developer, I created my WordPress test website which resides in the development environment. I can start coding my custom plugins for my customers. Now, I would like them to take a look at it and do some testing. So I can push my website over to the testing environment. With just a click of a button, Pantheon will clone your development website and database over to the testing environment. Now, I send my customers my testing URL and let them play around with the plugin. While they are doing some testing, I can still continue to work on the plugin(s) in the development environment without effecting the testing website. This is awesome. This works great for WordPress designers also. You can push your code over to testing, let your customers play around with your present work while you still continue to code away on your development site. Say goodbye to your localhost, say goodbye to trying to get Wamp Server or MAMP Pro up and running, say goodbye to dealing with adjusting your PHP settings, let Pantheon deal with all that while you get back to work developing plugins or designing themes. I tested connecting to my Pantheon websites using DreamWeaver and Sublime Text 2 editors without any issues. I am loving not having to deal with my localhost anymore.

Pantheon also keeps you informed about your server status, your database size, backups, and PHP error log. Pantheon also comes with a backup service and you can even have a Security setup on your development environment. You can use Custom domains and SSL certificates. Need access to your database, no problem. I just got the connection information, opened up MySQL Workbench, entered all of my credentials and I am in my database. Have a team of developers, Pantheon can handle it. They have a multi-dev environment for teams of developers.

Pantheon offers everything a WordPress developer/designer needs for their WordPress hosting. WordPress design agencies, WordPress development agencies, WordPress Theme companies, any business that uses WordPress can benefit from using Pantheon. Oh, by the way, did I mention Customer Service. Their Customer Service is awesome. You can email the founders and top Officers of Pantheon directly, that should tell you something. These guys care about their product and care about their customers, Bottom Line! So if you are looking for some new WordPress specific hosting, give Pantheon a try. Go on over to getpantheon.com (this is not an affiliate link), create your Free Sandbox account and give it a test drive. If Pantheon supports their WordPress platform like they do their Drupal platform, (which I am pretty confident they will), you will be more than satisfied. So if you are in the market for the next generation of WordPress hosting, ‘Put A Pantheon It!’

Blog, Reviews, WordPress,
PHP Logo

Comparing Dates in PHP

If you are a web developer sometimes we have to know multiple languages. At my job, I have to know PHP, ASP.NET, JavaScript, jQuery, HTML, CSS, SQL. You get the point. Even though programming logic is pretty similar across the board, the actual syntax of the languages are different. For example, in PHP you can declare a variable as such:

$carModel = 'Nova';

In ASP.NET,to declare the same variable we have to assign a data type:

string carModel = 'Nova';

In JavaScript, to declare the same variable:

var carModel = 'Nova';

So you can see that the logic is pretty much the same, just the syntax is different. So let us take a look at comparing dates in PHP. Dealing with Dates in all of the different languages are the same. So when I had to do some PHP coding for a WordPress plugin dealing with dates, I had to reference the PHP website. So whenever I come across issues that I have to spend time to research, I try to write a post and pass along my findings. Hopefully, this will save some people some time. I do not want to offend daily PHP developers. This guys that work with PHP on a daily basis can write this code in seconds with their eyes closed. But a lot of web developers, like me, have to know multiple languages. So here is how to work with dates in PHP and deal with comparing dates.

So first I had to get the current date, using PHP’s date function:

$todaysDate = date("m/d/y");

What this does is gets today’s date and formats it as such (01/31/2014). You can format the date in many different ways. See above link to the PHP date function page to see all the different ways of formatting. Then I have another variable that was assigned another date value from the database:

$car_end_date = $custom["car_end_date"][0];

Then I do an if statement and using PHP srttotime function, I can compare the dates. The PHP srttotime function “Parses about any English textual datetime description into a Unix timestamp”. So running both date variables though these function now we have both dates formatted exactly the same. We can now compare Apples to Apples instead of comparing my formatted date to whatever format date I got back from the database. That is it. Here is my code segment to see how it works. I hope this post has helped someone and saved them some time Goggling and searching the internet.

$car_end_date = $custom["car_end_date"][0];
$todaysDate = date("m/d/y");
if (strtotime($car_end_date) > strtotime($todaysDate))
{
     echo 'Yes';
}
else
{
     echo 'No';
}

 

Blog, PHP, Web Development,
WordPress Logo

Adding Dashicons to Custom Post Types Admin Menu

OK, WordPress Designers and Developers. I finally have figured out how to use the new Dashicons. If you do not know what the Dashicons are, go to the website here. With WordPress getting a nice overhaul in the admin theme, Dashicons are used throughout the new admin theme. So I just got finished making a new plugin which required a custom post type. So I wanted to give the new post type a cool new Dashicon then the default pin. So here are the steps:

1. In the custom post type script where you normally state the menu_icon this is what your syntax will be (see highlighted line # 22):

function create_orl_books()
{
register_post_type( 'orl_books',
  array(
    'labels' => array(
    'name' => 'ORL books',
    'singular_name' => 'ORL Book',
    'add_new' => 'Add New',
    'add_new_item' => 'Add New ORL Book',
    'edit' => 'Edit',
    'edit_item' => 'Edit ORL Book',
    'new_item' => 'New ORL Book',
    'view' => 'View',
    'view_item' => 'View ORL Book',
    'search_items' => 'Search ORL Book',
    'not_found' => 'No ORL Book found',
    'not_found_in_trash' =>
    'No ORL Book found in Trash'
    ),
    'public' => true,
    'menu_position' => 15,
    'menu_icon' => 'dashicons-[book]',    'supports' => array('title', 'editor', 'thumbnail')
    )
  );
}

2. OK. Now we know where to place the code correctly, how do we get the Dashicons? Go to the Dashicons website and find the icon that you would like to use.Click on the icon and go back to the top of the Dashicon home page and click on copy html. There you will see what the CSS class is and get that name and place it in the brackets on the menu-icon line.

3. Save your css page and then refresh your admin webpage and this is what you should see:

Blog, Web Design, Web Development, WordPress,
ASP.NET Logo

ASP.NET 4.0 Website Fix for IE 11

OK. This article ASP.NET 4.0 Website Fix for IE 11 will show you how to fix your websites that break in IE 11.  This is for anyone that has discovered the new IE 11 User Agent String issue. This is for all web sites, applications. projects that are targeted at the ASP.NET 4.0 framework. The main issue is the new IE 11 User Agent and the bug in the 4.0 framework. I will describe what the issues is and then show the fix. It is easier than upgrading your web server and all of your ASP.NET applications up to the 4.5 framework. The 4.5 framework has the user agent string bug fixed. So here is the details:

First there is a bug in the ASP.NET 4.0 framework when it reads the User Agent Strings. Here is the article talking about this issue from Scott Hanselman:

http://www.hanselman.com/blog/IE10AndIE11AndWindows81AndDoPostBack.aspx.

The bug causes the Post Back functions to not work. So when trying to view our ASP.NET 4.0 website in IE 11 our site would not work. All of our Post Back functionality was gone. So I tried using the Microsoft magic line of code to fix this issue by forcing IE to emulate IE10.

Microsoft Magic Line of Code: <meta http-equiv=”X-UA-Compatible” content=”IE=EmulateIE10″/>

Well this did not work. It forced IE11 to display site in IE10 mode but it kept the User Agent String as Default which would break the site. I then opened up IE 11 Developer Tools and then switched the User Agent String to IE 10 and BOOM, Goes the Dynamite! It worked. The site Post Back functionality is working. So I knew something was wrong. It would force IE to go to whatever IE version I chose, but it kept the User Agent String at Default, thus breaking the website. Image 1 shows dev tools and the website in IE 10 with User Agent String as default breaking the website.

ieIssue

 

image 2 show dev tools and the website in IE 10 and me manually changing the User String Agent to IE 10 and the website works.

 

ieIssueFx

 

So after many hours of research, I found out that Microsoft changed the IE 11 User Agent String. This caused IE 11 to stay at Default for User Agent String because it has been confused by the change. It is what I found out about the new IE 11 User Agent String: This is from the Microsoft website:

Here is the user agent string from IE 11 on a Windows 8.1 machine: Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko

IE 11 on Windows 7 machine: Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0) like Gecko

Older IE 10 Use Agent String Version: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0)

IE 9 User Agent String Version:

See in the past, to identify Internet Explorer just search for the string “MSIE” in the user-agent string. If present, the browser is Internet Explorer. Now that is gone in IE 11. Also they added ‘Mozilla’ and ‘like Gecko’ in IE 11 User Agent String. This sounds like a Firefox browser.

Here is the link from Microsoft about the IE 11 changes:

http://msdn.microsoft.com/en-us/library/ie/hh869301(v=vs.85).aspx

OK. Anyway enough about the issue. How the heck do we fix this. One fix that I read was to upgrade from the ASP.NET 4.0 framework to the 4.5 framework. I figured out an easier way around this. OK, we need to create an ASP.NET folder named, App_Browsers. This ASP.NET folder is the one most unknown. Here is a link to read more about the App_Browsers folder:

http://www.shubho.net/2011/01/what-is-appbrowsers-folder-in-aspnet.html

Now we just add a file with the extension .browser in this folder. Place this code in the file and save. Restart your IIS server and it works.

<browsers>
  <browser id="IE11" parentID="Mozilla">
    <identification>
      <useragent match="Trident\/7.0; rv:(?'version'(?'major'\d+)(\.(?'minor'\d+)?)(?'letters'\w*))(?'extra'[^)]*)"></useragent>
      <useragent nonMatch="IEMobile"></useragent>
    </identification>
    <capture>
      <useragent match="Trident/(?'layoutVersion'\d+)"></useragent>
    </capture>
    <capabilities>
      <capability name="browser"              value="IE"></capability>
      <capability name="layoutEngine"         value="Trident"></capability>
      <capability name="layoutEngineVersion"  value="${layoutVersion}"></capability>
      <capability name="extra"                value="${extra}"></capability>
      <capability name="isColor"              value="true"></capability>
      <capability name="letters"              value="${letters}"></capability>
      <capability name="majorversion"         value="${major}"></capability>
      <capability name="minorversion"         value="${minor}"></capability>
      <capability name="screenBitDepth"       value="8"></capability>
      <capability name="type"                 value="IE${major}"></capability>
      <capability name="version"              value="${version}"></capability>
    </capabilities>
  </browser>
 
  <!-- Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11,0) like Gecko -->
  <browser id="IE110" parentID="IE11">
    <identification>
      <capability name="majorversion" match="11"></capability>
    </identification>
 
    <capabilities>
      <capability name="ecmascriptversion"    value="3.0"></capability>
      <capability name="jscriptversion"       value="5.6"></capability>
      <capability name="javascript"           value="true"></capability>
      <capability name="javascriptversion"    value="1.5"></capability>
      <capability name="msdomversion"         value="${majorversion}.${minorversion}"></capability>
      <capability name="w3cdomversion"        value="1.0"></capability>
      <capability name="ExchangeOmaSupported" value="true"></capability>
      <capability name="activexcontrols"      value="true"></capability>
      <capability name="backgroundsounds"     value="true"></capability>
      <capability name="cookies"              value="true"></capability>
      <capability name="frames"               value="true"></capability>
      <capability name="javaapplets"          value="true"></capability>
      <capability name="supportsCallback"     value="true"></capability>
      <capability name="supportsFileUpload"   value="true"></capability>
      <capability name="supportsMultilineTextBoxDisplay" value="true"></capability>
      <capability name="supportsMaintainScrollPositionOnPostback" value="true"></capability>
      <capability name="supportsVCard"        value="true"></capability>
      <capability name="supportsXmlHttp"      value="true"></capability>
      <capability name="tables"               value="true"></capability>
      <capability name="supportsAccessKeyAttribute"    value="true"></capability>
      <capability name="tagwriter"            value="System.Web.UI.HtmlTextWriter"></capability>
      <capability name="vbscript"             value="true"></capability>
    </capabilities>
  </browser>
</browsers>

 

 

Here is the link where I found this nice piece of code: http://stackoverflow.com/questions/18244223/webform-dopostbackwithoptions-is-undefined-in-ie11-preview/19585664#19585664

ASP.NET, Blog, Web Design, Web Development,
ColdFusion Logo

Cold Fusion CFToolTips – Pushing the Limits

In this tutorial, Cold Fusion CFToolTips – Pushing the Limits, I will be demonstrating the cftooltip tag and what you can do with it. I will show you how you can do more advanced things with the cftooltips and I will be pushing the tag to its limits. I got the idea from one of my favorites CF Gurus, Raymond Camden. But my tooltip is a little bit more advanced as I am pulling all of my data from an xml file. Here is a link to the original article by Raymond that I used to create this tooltip in our companies intranet site. The files I created for this article is a scaled down version of what I implemented in our intranet site. I will also included the demo files used so you can download the files and place them on your Cold Fusion server to see them in action.

<a href=”https://s3.amazonaws.com/hyperdrive.designs.tutorialfiles/cftooltip.zip” class=”btn btn-primary” target=”_blank”>Zipped Demo Source Files</a>

 

Of course, if you have been reading my previous post, I have to support older versions of IE. So I found this EXCELLENT open source library to support CSS3 in IE called CSS3 Pie. Pie makes Internet Explorer 6 – 9 capable of rendering several of the most useful CSS3 decoration features. This allows my styling of the tooltips, rounded corners, to look good in the older IE browsers. The first section of code is the css styles for the tooltips. These styles are what actual style the tooltip sections. Also I have my IE fix using the CSS3 pie library.

<style type="text/css"><!--
.yui-tt {
    color:#000;
    font-size:12pt;
    background-color:#c6c6c6;
    padding: 20px;
    padding-bottom: 30px;
    width:500px;
	border-radius: 10px;
	-moz-border-radius: 10px;
	behavior: url(pie/PIE.htc);
  }
  .logos ul {
	  list-style: none;
  }
  .logos li {
	  display: inline;	  
  }
--></style>

 

Now this section of code is the engine that drives the tooltips to push them to their limit.
First, I find my xml file on my server (your url path will be different) and then parse the file and save it as mydoc variable. Then I create an array to place all my data from my xml file. My data is just a simple xml file with 3 different major league baseball teams with 4 pieces of information(id, team, league, website). I then loop through all the data and set all of the information to their corresponding values within the array. I then use this array to provide my information to the tooltips. ** Please not that I have tried many different syntax plugins and all of them do not seem able to correctly handle the cold fusion language and it injects code. For example, as the end of the code in the syntax box, there are multiple cf closing tags that do not belong there but the plugin injects them in there. be sure to download the tutorial source files for the accurate code.

<!--- This line makes a call to my xml that holds all my data --->
<cffile action="read" file="http://127.0.0.1:8500/cfxml/cftooltip/imageData.xml" variable="myxml">
<!-- Parse and set my data in a variable --->
<cfset mydoc = XmlParse(myxml)>
<!--- run through all my data and set up the array --->
</cfset><cfset numItems = ArrayLen(mydoc.imagesSections.images.XmlChildren)>
    </cfset><cfset orderquery = QueryNew("id, name, league, website") >
    </cfset><cfset temp = QueryAddRow(orderquery, #numItems#)>
    <cfloop index="i" from = "1" to = #numItems#>
        <cfset temp = QuerySetCell(orderquery, "id",
            #mydoc.imagesSections.images.imagesDetails[i].XmlAttributes.id#,#i#)>
        </cfset><cfset temp = QuerySetCell(orderquery, "name",
            #mydoc.imagesSections.images.imagesDetails[i].XmlAttributes.name#, #i#)>
        </cfset><cfset temp = QuerySetCell(orderquery, "league",
            #mydoc.imagesSections.images.imagesDetails[i].XmlAttributes.league#, #i#)>
       </cfset><cfset temp = QuerySetCell(orderquery, "website",
            #mydoc.imagesSections.images.imagesDetails[i].XmlAttributes.website#, #i#)>            
    </cfset></cfloop>
 
<div id="wrapper">     
            <div class="logos">
                <ul>
                  <!-- info for logo 1 ---> 
                	<cfset image_path = "images/bRedsoxLogoLarge.png" >            
					<cfimage name="large_preview" source="#image_path#">
					<cfset imageScaleToFit(large_preview,400,400,'bicubic')>
					<cfsavecontent variable="tooltip_image1">
    					<cfimage source="#large_preview#" action="writeToBrowser" text="text image">
                		<br />
                		Name: <cfoutput>#orderquery.name[1]#</cfoutput><br />
                		League: <cfoutput>#orderquery.league[1]#</cfoutput><br />
                		View: <cfoutput><a href="#orderquery.website[1]#">Website:</a></cfoutput><br />       
					</cfimage></cfsavecontent>
 
            	<li>
                	<cftooltip tooltip="#tooltip_image1#" hidedelay="5000">
                		<img src="images/bRedsoxLogoSmall.png" alt="Boston Red Sox"  />
                	</cftooltip>
                </li>
     			<!--- info for logo 2 --->
					</cfset><cfset image_path = "images/hAstrosLogoLarge.png" >            
					<cfimage name="large_preview" source="#image_path#">
					<cfset imageScaleToFit(large_preview,350,350,'bicubic')>
					<cfsavecontent variable="tooltip_image2">
    					<cfimage source="#large_preview#" action="writeToBrowser" text="text image">
                		<br />
                		Name: <cfoutput>#orderquery.name[2]#</cfoutput><br />
                		League: <cfoutput>#orderquery.league[2]#</cfoutput><br />
                		View: <cfoutput><a href="#orderquery.website[2]#">Website:</a></cfoutput><br />        
					</cfimage></cfsavecontent>
                <li>
                	<cftooltip tooltip="#tooltip_image2#" hidedelay="5000">
                    	<img src="images/hAstrosLogoSmall.png" alt="Houston Astros" />
                    </cftooltip>
                </li>
 
                <!--- info for logo 3 --->
 
					</cfset><cfset image_path = "images/sfGiantsLogoLarge.png" >            
					<cfimage name="large_preview" source="#image_path#">
					<cfset imageScaleToFit(large_preview,350,350,'bicubic')>
					<cfsavecontent variable="tooltip_image3">
    					<cfimage source="#large_preview#" action="writeToBrowser" text="text image">
                		<br />
                		Name: <cfoutput>#orderquery.name[3]#</cfoutput><br />
                		League: <cfoutput>#orderquery.league[3]#</cfoutput><br />
                		View: <cfoutput><a href="#orderquery.website[3]#">Website:</a></cfoutput><br />        
					</cfimage></cfsavecontent>
                <li>
                	<cftooltip tooltip="#tooltip_image3#" hidedelay="5000">
                    	<img src="images/sfGiantsLogoSmall.png" alt="San Francisco Giants" />
                    </cftooltip>
                </li>    
 
              </cfset></cfimage></cfset></cfimage></cfset></cfimage></cfset></ul>
            </div>
 
        </div>
 
</cfset></cffile>

 

Here is what the layout looks like.

Now you will just hover over one of the logos and the tooltip will appear as such:

Blog, Cold Fusion, Web Development,
WordPress Logo

WordPress Beginners Tutorial – Building a Theme Options Page

WordPress Beginners Tutorial – Building a Theme Options Page

After many hours of searching the web, looking for some great WordPress admin theme options page tutorials, I have found a lot of different methods which became confusing and complicated. So after many hours of learning and understanding how to create an options page, and after including an options page for some of my clients, I decided to create the most BASIC tutorial on this issue. I will try to be as basic and simple as possible so beginners can follow along easily. This tutorial expects the user to have a beginner background in html, php and WordPress. This tutorial will show the very minimal things to code to get a working options page in your WordPress theme. After you start to understand and learn the basics, then you can branch out and find some more advanced tutorials. So here we go. To set this up, say we are creating a brand new WordPress theme called Blitz. If there already is a WordPress theme called Blitz, this tutorial has no relationship to that theme and is purely by coincidence. Of course with our new Blitz theme, we have a folder called Blitz under our themes folder and includes the very basic files that are required for a WordPress Theme. The files we have in our Blitz folder are index.php, header.php, footer.php, style.css and functions.php.

Read More

Blog, Web Development, WordPress,
Internet Explorer Logo

IE 10 Drops Conditional Comments

OK, Everyone. Do not FREAK OUT yet. Yes, IE 10 Drops Conditional Comments. What is up Microsoft? What does this means to web designers and developers that have to support IE. It just means the old way of conditional commenting to target a specific IE version and then use a IE specific css stylesheet will not work. For example, the old way:

<!--- code for using different IE stylesheets --->
 
 <!--[if IE 8]>
       <link rel="stylesheet" type="text/css" href="http://library.utsouthwestern.edu/css/ie8.css" />
 < ![endif]-->
 <!--[if IE 9]>
    	<link rel="stylesheet" type="text/css" href="http://library.utsouthwestern.edu/css/ie.css" />
 < ![endif]-->

 

So here is the new way that I found that worked great for me.

In my main stylesheet, I use a media query to set the IE specific css style as such:

/**** IE 10 sepcific styles ***/ 
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) 
{ 
    #footer { 
        width: 525px; 
    } 
}

 

You can still use the old way if you have to support older versions of IE(7, 8, 9). But no dice for IE 10. For more information regrading this new issue check out this great article at SitePoint by Craig Butler.

Blog, Web Design, Web Development,
ColdFusion Logo

Cold Fusion CF Forms injecting javascript into head of webpage….

So, for those new to Cold Fusion or maybe someone that have not ran across this issue before, here it is. Cold Fusion cfforms tag automatically injects javascript code into the head of your webpage. Most of the time this might not be a real issue. But if you are like some us out there that still have to deal with supporting older versions of IE, then this can be a real headache. OK, here is the problem that I ran into and would like to share this to hopefully save someone else some precious time that I spent debugging.

We are redesigning our Cold Fusion website and decided to use more modern design elements such as HTML 5 along with a responsive design for our users with more up to date browsers. Now the problem is IE 7 & 8 has this dumb thing called compatibility mode. As IE looks at the webpage and it does not recognize doctypes and other things that are not compatible then it gets pushed down and the webpage is then displayed in the lower IE versions. Of course, older versions of IE does not understand HTML5 so if a user has compatibly mode enabled, it will break our new beautiful responsive website. Another thing in IE, is that if the website is considered an intranet site, it will automatically enable compatibly view. Working in an academic setting, our website is viewed on campus gets pushed to an intranet site. Off campus, it is not an intranet site. So as you can see our dilemma. But wait, there is a fix. There is a line of code that must be placed in the head of your webpage that will disable compatibly view and force IE to render the webpage in whatever IE version you are using. EXCELLENT! Here is that magic line of code:

<meta http-equiv="X-UA-Compatible" content="IE=edge"/>

 

There are many articles out there explaining this line of code so I will not go into details. So our problems are solved, now whenever someone views our website using IE 7 or 8, IE will stay in IE 7 or 8.

“STOP THE CLOCK”. After placing this code in the webpage’s header, it is still not working. What the heck. After doing many hours of research, I found an article that stated that this line must be placed right after your head tag. OK, no problem. I then placed our magic code right after my head tag. OK. this has to be it. But unfortunately, no luck. Still does not fix our issue. What is going on, I then looked back at the page source view and I see that javascript code from the cfform tag being placed right above my IE magic line of code. I start to scratch my head and said maybe this is causing this issue. So I disabled my cfform tag and guess what. BOOM, THERE GOES THE DYNAMITE! It worked! So now I have figured out the cause and now I need to find a fix.

There are a couple of different ways to fix this. One, DON”T USE the cfform tag. Use, regular html form tags. So for our main searchbox on our home page, I had to convert our cfform to normal html form tag. But that only solved our header section. Since this form sits in our header file and all of the rest of our hundred of pages call that same header file, then most pages are fixed. NOT SO FAST! This solved most of our pages except our Forms section.

We have a Forms section on the website that has about 20+ online forms. Do we really want to change all of this forms from cfforms to normal html forms(We have some very detailed forms using some special cfform tag options, cfform binding and heavy javascript) . But doesn’t that kill our point of using Cold Fusion. We choose to use Cold Fusion for all of its greatness and its many tags, that save us many hours of coding time. So how could we fix our code on all of our online forms, to take advantage of the greatness of Cold Fusion and its cfform tag but fix our IE issue. What we did was just re-code our forms and actually did a bit of hacking.

We hard-coded these two lines on each form page

<!doctype html>
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1"/>

before we call our main header file. Of course this is not very good coding in terms of semantics and validation, but we need the forms to work in all browsers and having to support older versions of IE, sometimes there is not much you can do. So now all of our Form pages use the cfform tag and all display perfectly in IE 7 &8.

To wrap this up, I am writing this post to hopefully have this land into the hands of some CF Developer and will hopefully save them many hours of debugging research. This might not be the only way to fix this issue but this is what we did to solve our issues.

Blog, Cold Fusion, Web Design, Web Development,