Entries for month: “April 2010”

Open links in a new window

Posted By: Mark Aplet 3 Comments April 30, 2010

If you perform a search for "open links in new window" you will typically find two groups of people. Ones the hate it when links open in a new window, and ones that hate links that don't open in a new window. It seems that people are pretty picky (and vocal) about the manor in which links open. Oddly enough searching for a good solution proved more difficult than I thought.

Basic Criteria

Because people are so particular about their links opening in new windows. I wanted to give users an option to open linked pages they way they want them to work. A preference toggle of sorts. I also wanted to default option to xhtml valid and it has to be accessible in it's default state or with javascript turned off.

Thanks to a friend and fellow web developer Andy Ford, who helped me with the final piece of the puzzle to make this work.

The Code

The code is pretty straight forward. We have a form with a checkbox with with text that reads something like "Open links in new window" This works as the preference toggle. If the box is checked do some dirty and non valid stuff to the code to make it work.

See a demo of this script here

<form name="targeter">
   <input type="checkbox" name="targetbox" id="tcheck" onclick="targetLinks(this.checked);">
   <label for="tcheck" style="cursor: hand;">Open links in new window</label>
</form>

<script language="JavaScript">
   function targetLinks(boNew) {
      if (boNew)
         where = "_blank";
      else
         where = "_self";
      for (var i=0; i<=(document.links.length-1); i++) {
         document.links[i].target = where;
      }
   }
</script>

I thought this was a bit easier to implement than most of the solution I found out there that required you to add a new class to the link. Some people suggested using rel="external" on the links. My response to this is simple. Not all links that need to open in a new window are external. Adding rel="external" is not semantic so I would prefer not to add that markup to my code in that way.

I am sure there is a better way to make this work. But this is what I scabbed together. If you have a better way, I would be interested in knowing about it.

Respond NowTags: Code · usability

Who Uses ColdFusion Anymore?

Posted By: Mark Aplet 3 Comments April 19, 2010

I went to a web development meeting a few days ago and when I mentioned during the introductions that I was a ColdFusion developer the reaction from others in the room was that of amazement. I think they were amazed that the language still existed. I'm not surprised really. It's actually a common reaction from developers.

Someone in the room asked, "Does anyone even use ColdFusion anymore?" I know that I see ColdFusion powered sites all the time, but for the life of me I could not recall a single site that used it other than MySpace. And honestly, that's not a shining example of a good CF site. Feeling a bit embarrassed that I could not recall some decent sites on the spot, I felt I needed to do a bit of research and compile a list ColdFusion powered sites. If for no other reason that to answer this simple question when asked.

So here is a list more popular sites that I know to run ColdFusion. If your wanting to find a more comprehensive list, GotCFM.com has a pretty large database of sites.

 

  1. AT&T (portions)
  2. Bank of America (portions)
  3. Boeing (portions)
  4. California Department of Toxic Substance Control
  5. California Department of Water Resources
  6. California Dept of Developmental Services
  7. CarFax
  8. Dallas Cowboys
  9. Doctors Without Borders
  10. Duke University
  11. eBags
  12. Ebay (portions)
  13. Energy Star
  14. Foot Locker
  15. Gamepro
  16. Georgia Tech Savannah
  17. Guitar Center
  18. Hasbro Toys
  19. HP (portions)
  20. Logitech
  21. Macworld UK
  22. Massey University
  23. Merrill Lynch (portions)
  24. MMORPG
  25. MySpace
  26. NASA (portions)
  27. Ohio University
  28. Pottery Barn
  29. QuickBooks Online
  30. Scientific American
  31. Section 508
  32. See's Candy
  33. The Economist 
  34. U.S. Bank
  35. Ultimate Fighting Championship
  36. University Of Amsterdam UVA
  37. University of Maryland
  38. US Dept of State
  39. Virginia College
  40. Vodafone

Respond NowTags: ColdFusion · Opinions & Rants

Theme Design By Mark Aplet

Super Powered by Mango Blog