craig campbell

  • added May 31, 2010 at 1:08 pm
    I use jQuery as my javascript framework of choice because I love how simple it is, and how much you can do with just a single line of code.

    I decided it would be a good idea to share some jQuery code snippets to do common tasks. So hopefully there will be plenty of posts where this one came from.

    The easiest way to open a link in a new window is to do something like this:
    <a href="http://www.google.com" target="_blank">search the web</a>

    Unfortunately, the target attribute is not valid in XHTML strict so you have to use javascript if you want your pages to validate.
    read more
  • added March 11, 2009 at 10:56 pm
    One thing I have realized in my journey across the internets is that there is no simple, clear way to make an overlay using only one div (at least that I could find). If you have no clue what I am talking about click on the "add comment" link, and you will see. The page dims, the curtain goes up and the audience applauds.

    Just a small disclaimer: The CSS that I am about to show you will work just fine in all browsers except for Internet Explorer 6 (what a shock!). I will show you the necessary Javascript (using jQuery) needed to fix this.
    read more
  • added February 22, 2009 at 11:33 pm
    So after getting this page up and running I had to do my fair share of debugging to make things work with Internet Explorer. This is the part of the day that every web developer dreams about. "What is going to break this time??".

    Anyway I decided to use my blog to share with you all solutions to problems I have come across so that you don't have to spend hours banging your head against the wall like I did.

    The first topic I want to discuss in this series is ajax calls using GET.

    To start I will paste to you the definition of GET from the World Wide Web Consortium
    read more