Need/Want to Hide Internet Explorer 6 Specific JavaScript from IE7?

I use conditional comments to hide IE6 specific styles and scripts from IE7 (and IE7 specific styles and scripts from other browsers), but sometimes you need a bit of logic or something to only run on IE6 and earlier. Conditional compilation is a pretty foolproof way to handle that. function ie_function() { /*@cc_on @*/ /*@if […]

Javascript: Parse Domain Name out of a String

Did I mention that the “Web” category might contain code? It might. In fact, it will. Here’s a random function I wrote last night that might be useful function getDomain (thestring) { //simple function that matches the beginning of a URL //in a string and then returns the domain. var urlpattern = new RegExp(“(http|ftp|https)://(.*?)/.*$”); var […]