Category Archives: Code

A place for code

Reading GET variables with JavaScript

I found a great piece of code whilst trying to figure out how to read get variables with javascript. function $_GET(q,s) { s = s ? s : window.location.search; var re = new RegExp(‘&’+q+’(?:=([^&]*))?(?=&|$)’,'i’); return (s=s.replace(/^?/,’&’).match(re)) ? (typeof s[1] == … Continue reading

Posted in Code | Leave a comment

Handy code: ifelse()

As with most web developers about half of my code is collecting information via forms (the other half is presenting that information). When a form is submitted there are a variety of variables that I might want to display back … Continue reading

Posted in Code, php | Leave a comment

3 posts before failure

Ugn!! I swore that this 3rd attempt at a blog would be successful, and that I’d update it regularly with insightful and useful comments to amuse and inform. 3 Posts in the first 2 days of my new site, and … Continue reading

Posted in Code | 1 Comment

Very Excited about CSS3

After spending a portion of the weekend coding my shiny new site I’ve really got the CSS bug again. So I was delighted when I checked Smashing Magazine for new articles and stumbled on their latest article about CSS3! As … Continue reading

Posted in Code | Leave a comment

A new beginning without Internet Explorer 6

At 3DPixel made the decision a few months ago that 7 years was a pretty good run for Internet Explorer 6, and that enough was enough. So we killed support for it in all future projects. At the time, I … Continue reading

Posted in Code | Leave a comment

CSS Rounded Corners

My first post on my shiny new blog is being written whilst I’m actually coding the template. The CSS3 spec gives us access to rounded corners without the need for images and loads of xhtml.  Just add the following to … Continue reading

Posted in css | Leave a comment