Your Internet Explorer is out of date and may not be fully supported.  I recommend you upgrade to Internet Explorer 8, or try Google Chrome.  Thank you.

Google Font Directory & WebFont Loader

After switching over to my new host, I decided to do some cleanup/optimizing of my website.  One of my biggest gripes was the size/annoyance of Cufon, which was what I used to load Century Gothic as a custom font for any of my header tags (I like the font a lot).  The downside to cufon was that it didn’t actually download the font to the users computer, instead it created on the fly images so to speak.  Thankfully Google just released their Fonts Directory & WebFont Loader, both great tools.  Font Directory consists of free/easy to use fonts for web development, and WebFont Loader is a javascript tool that can load any of those fonts, as well as fonts from other sources such as TypeKit or even you own hosting (Custom).  I chose to replace Tahoma as my main font with Droid Sans (the font developed for Android OS) from Google Font Directory.  I also optimized images by creating large sprites of common sized images (such as icons).  Finally I’ve also configured SSI (Server Side Includes) via Apache to pull my stylesheets and javascripts into single combined files upon page load.

Posted in Uncategorized | Leave a comment

Moved to MediaTemple.net

I successfully transfered my blog/website to my new hosting at MediaTemple.net.  The reason for my move is my old hosting didn’t allow 1/2 of the PHP and Apache features I tried to use over the past year or so, and after the final straw I decided it was time to move.  So far everything I’ve wanted to use has worked, and that alone is worth the increase in cost (about 4x what I was paying).  Now to weed out any issue’s of the process if there are any.

Posted in Technology, Web Design, Web Development | Tagged , , , , | Leave a comment

UNCC.edu Dissected

So far I have dissected Rowan-Cabarrus Community College (RCCC) and Golden Gait Trailer’s (GGT) websites. Continuing with my series I have chosen University of North Carolina at Charlotte or UNCC because its local like RCCC and is a four year university. At first glance UNCC’s website uncc.edu (shorter then RCCC’s domain) doesn’t have as many flaw’s as RCCC and GGT’s, but there are some. The most noticeable flaws are the colors, padding, and width. The left menu’s light blue is hard to read on the yellow/gold background, along with that the left menu’s padding is too narrow. The top right corner of the site has an icon based menu, but like other aspects of this website the padding is too narrow, leaving icons to get too close to the edge of the sites layout. Moving on to the content, the 4 boxed area’s include a very light grey text on white background which can be hard to read.

One huge flaw in my opinion that RCCC and UNCC share is that they both have one layout to start, and then drill into another completely different layout. If its one thing thats important its consistency, and having more than one layout obviously doesn’t show that. Another flaw that RCCC and UNCC share is that they both have narrow templates, modern standards dictate that 1024×768 pixel’s is the average resolution websites are viewed on, this is why most designs range from 900-960 pixels wide.

Included below is a screenshot of UNCC site at time of dissection, just in case they change it drastically like RCCC did.
UNCC Website

Posted in Web Design, Web Development | Tagged , , , , , , | Leave a comment

Working with jQuery

Lately I have been slowly teaching myself how to write jQuery scripts by hand, and its usefulness has come up at work, were I’ve been asked to find solutions to problems and idea’s.  Sometimes I try to find some examples on the web related to what I am trying to come up with, however I don’t always find the exact solution, and sometimes I find posts by people who are looking for the same solution as me, but without an answer.  So I thought why not share what I have comeup with so far, maybe someone will one day need to do the same thing, or relatively the same thing and giving them a head start would be the nice thing to do.

The first case I have goes as follows, there’s a page with more then one Select dropdown, but a user is only allowed to choose one of these dropdowns options, so on the fly I needed to be able to disable all the other dropdowns on the page.  The solution below worked flawlessly after I wrote it and tested it.

$(document).ready(function(){
	// Dropdown Change causes other dropdowns to disable
	$('select').change(function(){
		if ($(this).val() == 'Default Value') {
			$('select').not($(this)).removeAttr('disabled'); // Enables all other selects because value is default
		} else {
			$('select').not($(this)).attr("disabled","disabled"); // Disables all other selects because value isn't default
		}
	});
});

The next case I have is that an asp.net form in a cms known as Kentico outputs user info, to which the columns and form are shared between three types of these users, so I was asked to hide the empty fields which were displayed without an input box, this made it a bit trickier.  The real tricky part in the jQuery was finding those empty spans, then hiding their parents parent (span inside a td inside a tr) on the fly.

$(document).ready(function(){
	$('#header-summary span').each(function(index, element){
		if ($(this).is(':empty')) {
			$(this).closest('tr').hide();
		}
	});
});

The last case is the longest and most time consuming, someone had the great idea of having a select drop down that allowed the user to choose a method of delivery for a product manual, the choices were Email PDF and physical mailed copy, but not both.  Were this got tricky is, the email pdf option needed to display an input for their email address, and the physical copy needed inputs for the users address.  So the idea was that if they selected Email PDF in the drop down an input for email would show up, however if they changed that drop down to physical mail copy, the email pdf input would disappear and the address form’s inputs would appear. Were it really got tricky was that someone had the idea to have the submit button disabled until the user filled out the necessary fields based on what their choice was, which because these inputs shared the same form a general validation plugin wouldn’t do the trick. I came up with a solution, to which just by having these inputs separated by divs I could check the necessary ones based on the select option that was chosen, and enable the submit button only when the user filled out the necessary fields, or disable when they haven’t. This was by far the trickiest of the jQuery scripts I had to write this week, and the most time consuming (since those two things kinda go hand and hand).

$(document).ready(function(){
	$('#mailing-address').hide();  // Hide the mailing address form
	$('#submit-button input[type=submit]').attr("disabled","disabled");  // Disable the Proceed Button
	// Dropdown Select Show/Hide Forms
	$('#delivery-method-dropdown select').change(function(){
		if ($(this).val() == 'Email') {
			$('#submit-button input[type=submit]').attr("disabled","disabled"); // Disable the Proceed Button
			// clear the mailing address form
			$('#mailing-address input[type=text]').each(function(index, element){
				$(this).val('');
			});
			$('#mailing-address').hide(); // hide the mailing address form
			$('#email-address').show();  // show the email address form
		}
		else {
			$('#submit-button input[type=submit]').attr("disabled","disabled"); // Disable the Proceed Button
			// clear the email address form
			$('#email-address input[type=text]').each(function(index, element){
				$(this).val('');
			});
			$('#email-address').hide(); // hide the email address form
			$('#mailing-address').show(); // show the mailing address form
		}
	});
	// check the email form to see if the user has filled it out and if so enable the Proceed button
	jQuery.fn.checkAllEmail = function() {
		$('#email-address input[type=text]').each(function(index, element) {
		if ($(this).val() == '') {
			$('#submit-button input[type=submit]').attr("disabled","disabled");  // disable the Proceed button
			return false;
		} else {
			$('#submit-button input[type=submit]').removeAttr('disabled');  // enable the Proceed button
		}
		});
	}
	// check the mailing form to see if the user has filled it out and if so enable the Proceed button
	jQuery.fn.checkAllMail = function() {
		$('#mailing-address input[type=text]').not('#address-2 input[type=text]').each(function(index, element) {
		if ($(this).val() == '') {
			$('#submit-button input[type=submit]').attr("disabled","disabled");  // disable the Proceed button
			return false;
		} else {
			$('#submit-button input[type=submit]').removeAttr('disabled');  // enable the Proceed button
		}
		});
	}
	// Run the function to check the Email Form
	$('#email-address input[type=text]').bind('mouseenter mouseleave focus blur keypress', function() {
		$(this).checkAllEmail();
	});
	// Run the function to check the Mailing Form
	$('#mailing-address input[type=text]').bind('mouseenter mouseleave focus blur keypress', function() {
		$(this).checkAllMail();
	});
});

During my search for solutions I came a crossed a post where somebody was trying to achieve a part of what I was, and they were pretty close to doing so. After I got the solution to work, I of course posted back so that in the future anyone who goes looking for the same sort of solution will find what I used that worked. On the jQuery forums – Enable/Disable submit depending on filled out form

Posted in Technology, Web Development | Tagged , , | Leave a comment

Golden Gait Trailers Website – Dissected

GoldenGait.com is the website of a trailer dealer here in North Carolina, which just so happens to be less then a mile from my college.  I’ve seen the site progress twice within a short period of time (less then a year), originally looking like a 90’s website, it was transformed into something else, though highly amateur in looks, a slight improvement over the 90’s design.  Now it has changed yet again, and to no surprise not much of an improvement.

Like my colleges website, this site has issues in the line-height (vertical space between text lines) and padding (spacing between elements) areas.  It doesn’t help that the fonts don’t really seem to match up too much, as well as some hard to read (dark gray) text on a black background.  What’s worse is the placement of elements like the phone and search at the top, as well as the way the logo, navigation and rotating banner line up.  The overall “theme” is really mixed, theres blacks, blues, grays, yellows, and reds.  One thing I hate seeing is rotating banners that give the user absolutely no control, which makes it really annoying when you want to see a particular picture for a longer period then allowed (usually controlled by a simple mouse over pause), as well as the ability to move between them at your discretion.  I’ll give one credit to the site its not too narrow, but instead is 10 pixels over the recommended 960 pixel width (not as big of a deal, but I prefer to never go beyond the 960 pixel width).  Now, as far as the other pages go, at least the main layout stays in place changing only the content.  Code wise no table based layout is used (which is a good thing), however some tables are used in navigation which is something I wouldn’t suggest.  Something tacky in the footer bothers me, that is the displaying the amount of visits since a certain date, sorry but this should be kept private or at least in code view (commented out).

I know that absolutely no website will ever be “perfect” (not even the corporate sites, someone can nitpick about something), but there is a certain level of professionalism that should be met by companies.  The key importances in any website design are user-friendliness and functionality, to which this site needs improvement in those areas (text is a big part of user-friendliness).

Posted in Tutorials, Web Design, Web Development | Tagged , , , , , | Leave a comment
  • Meta

  • Tag Cloud