Thursday, August 19, 2004

Fun with DHTML

I just published a new article on the Tips and Tricks page but this one has a difference. You may have noticed a few of my pages have optional C# and VB code sections that can be chosen on-the-fly as you read. These are simple DHTML scripts that turn different sections of the page on or off according to choice. The problem was with the method, which I got from another web-site I hasten to add, was that if more than one section of code needs swapping out then the javascript becomes ever more complex with each new bit. What I needed was a way of turning on all the C# or all the VB in one go.

This is the first time I've messed about with DHTML in any serious way and so I'm rather pleased with the end result. What I did was give all the C# or VB statements a unique ID based on the pattern "CSA" "CSB" or "VBA" "VBB" and so-on. Then I created code that went through all the specially named elements one by one turning them on or off as needed. Finally I put a couple of sexy mouseover buttons on the page to finish the thing up and voila...


If you'd like to see the code in it's production form go read the article. If you'd like to see the bare-bones dynamic page you can see it here.

I'm sure I'll get a bunch of responses from clever DHTML jockeys telling me it's all wrong but I'm as pleased as a dog with two tails...

Well Formed

I have temporarily suspended all Well Formed subscriptions while work goes ahead on the new site. I am currently fielding tens of requests per day that go something like this.

Subscriber: "Bob, I haven't seen the latest issue of Well Formed. Whats up??"

Bob: "Hi, your e-mail system bounced the subscription, heres a duplicate"

Subscriber: "Bob, are you there??"

Bob: "Hi, yes, your e-mail bounced that one too because it had an attachment, why not try using yahoo mail or something"

Subscriber: "Bob, I have written to you twice with no reply. Why are you ignoring me??"

Bob: "Dude, I'm not ignoring you, your SPAM filter has decided I am bad news and you can't see my replies"

Subscriber: "Bob, you are an ignorant useless git and I'm cancelling my subscription forthwith. I've never seen such unprofessional crap in all my years as a blah blah blah"

You can see that when this happens about 10 times a day it make me happy, contented and glad to be of service _NOT_.

Wednesday, August 18, 2004

Big changes going on.

If you've visited my site recently you'll have noticed some major changes going on. BobPowell.net is going back to its roots inasmuch as it will no longer provide consulting or tools offerings but will be a place for publishing information such a the FAQ and Tips and Tricks. It's becoming increasingly difficult to separate my need to educate from my need for an income and I don't want my personal site to degenerate into a mish-mash of confusing stuff that people go to for help but that screams "money-money-money!!!" at every turn.

For the commercial side I have a couple of projects in work. WellFormed.net is a site that will shortly be running the Well Formed Magazine and XRayTools.net will be providing tools to developers in a clear-cut and commercial manner. Both of these sites will sponsor BobPowell.net. This will allow me to get on with the business of creating articles and code of the higest quality possible for the FAQ and Tips and Tricks along with whatever else comes along.

Google Adsense is my only concession to online commercialism on that site and I came to a bit of a revalation the other day when I was explaining to my son Robyn, who wants to be a webmaster bye-the-way, that effectively, AdSense makes the hosting cost of the site free! This means that a site such as bobpowell.net can be self sustaining and self justifying without even worrying about the commercial aspect of trying to make a hard-sell every time someone visits the site.

Things will be a little bit up-in-the-air for a while but when they settle down again I hope that the new look and feel coupled with the philosophy of free information will be well received.