Javascript Parse URL Function

var parseURL = function (uri){ var url; if (typeof uri == ‘undefined’) { uri = location.href; } else if (uri[0] == ‘/’){ uri = location.host + uri; } url = uri.match(/^([^:]*:\/\/)?([^:]*:[^@]*@)?([^\/:]*\.[^\/:]*)?(:[^\/]*)?(\/[^?#]*)?(\?[^#]*)?(#.*)?$/i); delete url.input; url.protocol = ((url[1])?url[1]:’http://’).split(‘://’)[0]; url.user = (url[2])?url[2].split(‘:’)[0]:undefined; url.password = (url[2])?url[2].split(‘:’)[1].split(‘@’)[0]:undefined; url.host = (url[3])?url[3]:location.host; url.hostname = url.host; url.port = (url[4])?((isNaN(parseInt(url[4].split(‘:’)[1])))?80:parseInt(url[4].split(‘:’)[1])):80; url.path = (url[5])?url[5]:’/’; url.pathname […]

Book: Head First C#

I’ve had the need to learn more application programming other than just web-based scripts. So as one of my first adventures into Microsoft Visual Studio 2008, I chose C#(that’s pronounced ‘see sharp’) and picked up the Head First C#. I must admit that Head First uses a very unique method of teaching, but while they […]

Flex Masked Input Text Field Component

Here’s one of the most useful Flex components I’ve run across. It’s a text field that masks the input of your characters to whatever format you want. Many thanks to Peter Ent for creating this!