Web Design

Videobox 1.1


If you are familiar with lightbox you know how useful a tool it is. While with lightbox you you can easily display images, with Videobox you can do the same thing only with videos.

Videobox was written using mootools and uses the swfobject to embed flash videos. Videobox works great for videos from YouTube, but also works with other services.

Click here to go to the official page on SourceForge. The page includes code directions and demos of the library.

Check out Videobox and let us know about any cool sites or applications that you build with Videobox.

When Will We Start Seeing Major OpenID Support?

OpenID is a great idea as it moves us closer to not having to remember a million user id's and passwords. Way back in February of this year Kevin Rose of Digg.com announced that Digg would be supporting OpenID later this year (click here to read about the original announcement). At the time I was very excited, but unfortunately it doesn't look like we will be seeing it this year (unless one of you readers knows something that I don't).

This got me looking around at various popular social networks and web applications and the only major site that I have found that allows for OpenID login is DZone (which make since as it is a social network for developers). As for the other major social networks (such as YouTube, MySpace and Facebook), unfortunately there has been no adoption of OpenID.

Hopefully early next year we will see Digg.com put OpenID functionality on the site. This would make it the largest Social network (and one of the top sites on the internet, according to Alexa it is currently ranked 117) to place OpenID functionality on the site. Once this is done hopefully many more sites like MySpace and GMail will follow suite and the web will start to become a place where we can always have a single sign on (except perhaps on Microsoft affiliated sites). Well, I can always hope at least.


Will Firefox Ever be Able to Gain Enough Traction to be Taken Seriously by Microsoft?


When looking at the stats for this blog I found that over 70% of the traffic that we are receiving is from Firefox users! I shouldn't be surprised since most developers (especially developers that write a lot of JavaScript such as Ajax developers) prefer Firefox over Internet Explorer. As a developer I always get my code running in Firefox first as it is more strict and has better script debugging (in fact there have been quite a few times that IE will not display an error but the script won't work, however, if you run the same script in Firefox it will throw an error that is useful).

All of this got me thinking if there will be a time that Firefox could have as much as 50% of the browser market. According to a CNET article (click here to read the article) Firefox has 12.5 percent of the browser market as of 2006 and some say that it is now around 20 percent. This is enough to make Microsoft take notice, but not enough for them to change their ways. You may be asking why does Firefox's market share matter? Well if Firefox gains enough market share it will force Microsoft to better adhere to standards instead of force feeding us technologies like Silverlight. This could be huge when the next version of JavaScript is released as IE will probably not adhere to much of the new standards.

Unfortunately, Microsoft has not shown that it really wants to adhere to web standards (I personally was extremely disappointed with IE 7 as it promised to fix so many things and didn't take care of many of them, plus it seems to render pretty slowly). Microsoft has shown that it is trying to take over Flash's place in the market with a plug-in that runs on Linux for Silverlight. This seems to be great, but if they can take over the marketplace then they will probably remove the Linux support and try to force everybody to IE and Vista (this is the way Microsoft has been in the past). Microsoft not adhering to standards is the reason that we still have to write browser specific code (it is not as bad as it once was, but it isn't that much better).

This leads to the question of how will Firefox be able to get enough market share to scare Microsoft into playing fair by adhering to standards? Only a small amount of home users will change browsers, since IE is built into their operating system. So, where the change needs to start happening is at the workplace. The more enterprises that start using Firefox will not only increase the market share of enterprise users but would probably start increasing the amount of home users as people that had never used Firefox would come to love it as most tech people do (I know this may just be a dream).

So now that you've endured this article (and no I'm actually not 100% against Microsoft) keep browsing with Firefox as the more that web masters see Firefox the more market share it has. So, please don't use IE, use Firefox instead!

I know that you all have comments, so let me know what you think about this topic.

A Better Ajax Back Button Solution

If you've spent any time coding an Ajax application you know that the one of the problems with Ajax is that it breaks the back button. You have probably seen solutions that use an iframe and a hash (#) in the url to fix this issue. While this works there is a much simpler way that I've been using in my applications for the last year or so.

The key is the A tag (also known as the anchor tag) and the name parameter with a hash in the url. The trick is to either dynamically create the element or to just change the value of the name parameter to the matching value of the hash.

Below is an example of changing the name of the anchor tag.

//Anchor Rename Object this could also be a simple function if preferred.
var AnchorRename=new Object();
AnchorRename.CreateObject=function(anchorname, anchorid){
	this.anchorid=anchorid; //This is the id of the anchor element
	this.RenameAnchor(anchorname, anchorholerid);
	RenameAnchor:function(anchorname, anchorid){
		document.getElementById(anchorid).name = anchorname;

In this example you would pass in the new value of the name (which must be the same value as after the hash in the url) and the id of the anchor element.

Below is an example of dynamically creating the tag and name values.

//Anchor Rename Object
var AnchorRename=new Object();
AnchorRename.CreateObject=function(anchorname, anchorholderid){
	this.anchorholerid=anchorholderid; //This is the id of the element to hold the new anchor
	this.RenameAnchor(anchorname, anchorholderid);
	RenameAnchor:function(anchorname, anchorholderid){
		var AnchorCode=document.createElement("a");
	        AnchorCode.setAttribute("name", anchorname);

In this example you would pass in the new value of the name (which again must be the same value as after the hash in the url) and the id of the anchor element.

Now the question that you may be asking is how does creating or renaming the anchor element help with fixing the back button. That is where when you call the object comes into play. You need to create or rename the object before a link is clicked. So, I would recommend using an onmouseover and an onfocus event to call the create or rename of the element so that before a link is clicked the required anchor element will be created.

I hope that this post has shown an easier solution to fix the back button problem that occurs when we create Ajax applications. Now go out there and try using it on your applications!

Update: I have posted a working example of this solution and it can be read here.

Syndicate content