Recent Blog Posts
Blogs » Archive for April, 2007
Better Markup with Control Adapters
Of all the prominent server-side languages, ASP.NET definitely has the worst reputation amongst designers. Many of the controls in ASP.NET rely on table structures, inline styles and various other things that make a web designer’s life difficult. In an effort to alleviate this in ASP.NET 2.0, Microsoft introduced a new theme system. Unfortunately, the only thing you could really do with these themes was change the class names assigned to the table structures.
Fortunately, ASP.NET does have a great feature called control adapters that allows developers to have more control over the markup generated by the controls. In fact, a few months ago Microsoft released an entire set of pre-built CSS friendly control adapters. These pre-built adapters are a great way to cleanup the markup of many of the ASP.NET server controls, but they may not be exactly what you’re looking for. This post will shed some light on the process of building your own control adapters.
Hi, my name is…
Let me introduce myself, My name is Chrispian Burks and yes, you can call me Chris. I’ve been a member here at SitePoint since November, 2001. I’ve also been a Mentor in the forums and contributed an article or two. I had the chance to meet some of the SitePoint gang at SXSW (2007) and they somehow roped me into blogging for them.
I started dabbling in web dev as a hobby back in 1996 when we called every page on the Internet a “web site”. I started early enough that I didn’t know anyone who could teach me what I needed to know so I ended up a jack of all trades. I’ve done everything from building ISPs and Web Hosting companies from the ground up to working as a designer or developer at various local firms, most recently started my own company, a blog network.
As a programmer and developer my skills are in PHP and MySQL, though I’m pretty good at Perl, Python, Shell Scripting, JavaScript and a few other odd bits as needed. I don’t pretend to be the best at any of these things, but I get the job done. I’m also decent with Photoshop, …
A Simple Introduction
My name is Ian Muir, and I’m a new blogger here at SitePoint, so I thought I’d take a minute to introduce myself and let you all know what to expect. During the day, I’m a mild-mannered web applications developer for a news clipping service. At night, I do a variety of freelance projects and direct client work. My development work is generally in ASP.NET or PHP with frequent forays into ColdFusion. I also consider myself somewhat of a standards evangelist.
JavaScript Keyboard Accessibility
The following is republished from the Tech Times #161.
JavaScript accessibility is an issue fraught with controversy and imperfect solutions, particularly when it comes to supporting the screen reader software that many visually impaired users rely on. These difficulties have led many developers to give up on accessibility entirely, when making your JavaScript accessible to some users can be refreshingly straightforward!
One group of users that it’s often very practical to accommodate in your JavaScript-powered web applications is keyboard users. Often due to a lack of fine motor control, these users get by without a mouse and instead navigate around the Web using the keyboard.
Let’s look again at the accordion control that I introduced in Tech Times #159, and see how we can make it work for keyboard users.

Here’s what the structure of the accordion’s HTML looks like:
<ul class=”accordion”>
<li>
<h2>Jonathan Archer</h2>
<p>Vessel registry: NX-01</p>
<p>Assumed command: 2151</p>
…
</li>
…
</ul>
The way this control works for mouse users is that the heading of each fold of the accordion is clickable:
var folds = accordion.getElementsByTagName(”li”);
for (var i = 0; i < …
Losing REST over Ajax Errors?
All too frequently, I see Ajax examples where the response is handled like this: (pseudo-code used for demonstration purposes)
xhr.onreadystatechange = function()
{
if ( xhr.readyState == 4 )
{
if (xhr.status == 200)
{
// Process returned data (eg: Parse XML).
// Check status of result depending on custom/ad-hoc error detection.
// — most commonly a 0 for fail, or 1 for pass
// Deal with/report error, or take some other action based upon returned data.
}
}
}
The above approach works, but as your application grows and your need to provide useful error reporting (and error avoidance!) increases, the good ol’ boolean-style error checking will quickly become unwieldy. I can see it now…
- Developer 1: What does an error code of 7 mean again?
- Developer 2: Ummm, Hang on, I’m sure we wrote that down somewhere…
Fear not, there’s a much smarter alternative, one which you rely upon every time you …
Are You Ready For Web 3.0?
Ok, so I admit it — the title of this post was indeed meant to draw you in. But before you jump straight to the comments form to leave your cynical wisecracks, hear me out.
Granted, we’ve struggled until now to even agree on what the term “Web 2.0″ means (although SitePoint’s own Kevin Yank has done a pretty admirable job of explaining the term in the past). As a result of the overuse of this marketing-friendly term, now anyone who doesn’t work in marketing physically cringes whenever they see or hear the term. Which is a shame, in my opinion — something that could potentially be used in a positive manner to communicate a new phase of the Web is instead being used to poke fun at the tech boom (yours truly, guilty as charged) and mock those who generate more spin than substance.
So what if there was a way for the term to be more clearly defined? What if we were to recognize that the Web is actually an ecosystem that is evolving, and that a version number — when applied to the Web — is as good a way as any to describe the …
Sponsored Links
SitePoint Marketplace
Buy and sell Websites, templates, domain names, hosting, graphics and more.
Download sample chapters of any of our popular books.




