February 3, 2010

OVO Creative Group launched their new web site

Category: Blog,JavaScript,PHP, Tags: , , , , khadlock at 1:22 am

OVO is a branding consultancy specializing in naming, visual identity and integrated marketing for organizations seeking to launch, grow or reinvent themselves. We developed OVO’s web site based on their original designs. Using PHP and MySQL we created a content management system (CMS) for OVO to manage their client projects and organize their project slideshows. We also developed a custom JavaScript slideshow widget that randomizes and animates OVO’s projects based on a custom JSON feed. Read more…

 

November 19, 2009

Remove all select options with JavaScript

Category: Blog,JavaScript, Tags: , khadlock at 1:23 pm

Here’s a quick function to remove all select options using JavaScript.

function RemoveAllOptions(selector)
{
     while(selector.hasChildNodes()) selector.removeChild(selector.childNodes[0]);
}

 

November 13, 2009

Setting the label “for” attribute with JavaScript

Category: Blog,HTML,JavaScript, Tags: , , khadlock at 10:53 am

Sometimes JavaScript offers unique names for element attributes, for example, CSS properties with words that are normally separated with dashes are camel case in JavaScript. The label element’s “for” attribute is no exception, in fact it’s probably the most unique one I’ve stumbled across, which is why I thought it was important to share. When you set the label “for” attribute with JavaScript you have to set it as “htmlFor” and of course give it the same value as the input element’s id that you are tying it to.