Blankety Blank

Well, I’ve discovered a very interesting piece of html interaction. OK, perhaps not very interesting, but at least slightly interesting.

A few weeks ago I made a small change to my amateur orchestras website which I thought would tidy up a lot of the underlying web links. The site links to a lot of sites of orchestras around the country and for the links I’ve used the target=”_blank” mantra to make sure they load in a new page. Well now I discovered a tag that was new to me, the base tag. This allows you to set the default behaviour of ALL of the links on your page. So, hey presto, just one of these tags at the beginning of the page saves dozens of target specifications and maybe even some space on the site.

But of course it’s never quite that simple. Also embedded in the web pages are a bunch of OTHER links, which themselves contain some embedded javascript to de-obfuscate some hidden email addresses and open the default mail client. Guess what – the base tag prevents them from working. Instead of generating a nice mailto: link and opening that default email client, all that happens is a new blank page is opened. Nothing else.

So it’s back to the drawing board, and back to the target attributes for the time being.

I love software!


No comments yet

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: