The DHTML Window Thing

March 24th, 2006

I put a bit more work into the OS-Style website this evening and the resizing is done now. I tried the getElementById() approach first, changing the width and height of various elements via their CSS properties, and it seemed to work just fine. I had to make some consessions with the ‘grabbing’ of the resize gadget in that you always grab it right in the middle, but the effect is unnoticable and – what the heck – it works.

All that remains now is to get the windows to disappear when you hit the ‘close’ gadget, and since they’re in a DIV anyway, all I need to do is set their visibility to invisible.

Coming Soon…

March 24th, 2006

I know I’ve been stupidly busy over the past few weeks – hence the complete disregard for site updates – but a few days ago it occurred to me that I could quite easily make a box that followed the mousepointer around the screen. This was an offshoot of some mouse-tracking stuff that I’d done for another website. I knocked together a simple demo that had two ‘windows’ on the screen. They were mere tables comprising a Title row and a Body row but they did the job. You can click the title bar and drag the window around the screen muich like an OS, and click on a partially hidden window to bring it to the front – again, just like an OS.

I spent all yesterday working like crazy once again but giving occasional thought to how I could implement this into my website. Yes, it’s time to re-design the bl0g! The new one will be going back to it’s ‘green bar’ roots but will look more like some weird, web-based version of Linux. Everything’s going to be redone from the ground up which will mean the forums stuff will take ages, but it’ll be worth it.

Last night’s technical challenge was to stop the mouse-pointer ‘dropping’ the window if you moved it too fast and went outside the boundary of the title bar. It all stemmed from the fact that I was using an IFRAME to display a second content file and replacing this with a DIV, style overflow:auto, fixed the problem nicely. This has the added advantage of making all of the content part of the ‘desktop’ page rather than a seperate file, which in turn helps with search engine optimisation.

I think tonight’s fun (after I’ve been to see Booty will be to get the window resizing working. Currently you can drag the windows about the screen but they’re a fixed size. The resizing presents it’s own problems because the windows have PNG dropshadows, and the only way to get those to work on IE is to use a behaviour fix that only works for the IMG tag – PNGs as background images don’t work.

I think I’m going to have to use innerHTML and redraw the IMG tags as the windows are being dragged larger. There are seven PNG files to redraw so I’m not sure what the speed is going to be like. It may be possible to hook into them using getElementById and adjust the width/height (where applicable) CSS properties which I *think* will be faster. Obviously some experimentation is going to be required.

Right, I better get ready for work…

Backup Time!

March 18th, 2006

1. I just found a 60GB Harddrive on my shelf.
2. The Beast has a removable drive caddy.
3. I really ought to back up some data.

I’ve no idea where the drive came from since I can’t recall a situation where I ended up profiting by one (1) 60GB harddrive, but it seems fortuitous that I should find such a drive just as I’m reading about backing up data and the horrible things that can go wrong if you don’t actually do it.

60GB isn’t a fantastic amount, but it’s enough to back up my HTTP folder (10.6GB), My Documents (5.8GB) and my Outlook .pst files (not a clue), so what the heck. I’ll download a copy of TrueCrypt and get right on it.

It’s currently formatting as drive R: (R for removable, see). What’s the betting my machine explodes while I’m doing this bit?

Car Insurance

March 18th, 2006

It’s that time of year – my car insurance runs out in just under a month and I’ve got to out myself through the rigmarole of ringing round the various insurance brokers to try and save a few quid here and there. Generally speaking it’s a pain in the arse.

Or not. Since I’m hardly the world’s most patient guy I just pump my details into AutoTrader’s Insurance thingy and let it do the searching for me. Cheapest it came back with was £379 compared to my renewal quote of £450. I called up my insurers armed with this price and they dropped theirs so £396.

For the sake of £17 (what’s that, not even half a tyre?) I’ll stick with Norwich Union simply because they get things sorted out if you actually need to claim. When a friend’s car was broken into a few years ago we had a courtesy car the same day and pretty much continued as if nothing had happened, other than having to make a few phone calls. Everything was taken care of.

Now on the new server…

March 17th, 2006

Aftger a week of intensive headscratching, moans of frustration and outright cursing at our new overlords hosting company, I’ve managed to get maybe 2/3rds of our websites over onto the new server including this one. It’s been… interesting.

The new server is actually shared, thus it’s only a virtual one, but it does mean that we get all the features of the old one up to and including root access on our own virtual machine. There have been a few hiccups during the move (our server number is 001-01 so we feel like a bit of a guinea pig) but the tech guys have been pretty good about sorting things out.

The machine specs are slightly better on all fronts except for the amount of disc space which is roughly halved. Since we used about 6% of our previous machine, howevere, this isn’t really cause for concern.

I’ve got until the end of the month to move the rest of the websites over, so plenty to do.

Er.. no it isn’t.

March 5th, 2006

Seems I spoke too soon with the above post. While the browser lockup problem hasn’t occurred at all, videos from the BBC’s website are still shimmering within the embedded player. Oddly enough, videos played in either WMP or Quicktime seem to be fine – it’s just the embedded ones that give me the problem.

nVidia Dual-Screen video ’shimmering’ problem fixed.

March 5th, 2006

I finally got round to upgrading the nVidia drivers for my XFX 6600GT to the 81.98 version. I’ve had a couple of problems for a while:

  1. Video Shimmering
    Mainly in WMP but affecting all video players, videos would ’shimmer’ like a dodgy 5th-generation porno. It seemed to be every second line and didn’t matter which screen it was on. It may have been related to the sheer bandwidth required to run two 1600×1200 displays as a single desktop, but I’m pretty sure it used to happen with cloned displays as well.
  2. Browser/Screen Locking
    Frequent enough to be bloody annoying, browsing in IE (quiet, you!) would occasionally lock the whole desktop for a few seconds until the screen went black and then reappeared. So far this hasn’t manifested itself, as with the above video complaint, but we’ll see how this one goes.

I’d say these two problems were just as annoying as each other, since I’ve been watching a fair bit of video on The Beast just recently. I’ve even had the twins set up as two TVs – showing a DVD on one and WinTV on another.

Weekly Round-up!

March 3rd, 2006

I’ve been busy at work with a couple of things – the first was a recruitment/consulting combined website which was a remake of one we did a few years ago. We’ve basically redone the whole site in PHP and moved all the vacancies into a MySQL table. The new design is very nice, and we’ve had an enquiry from a related site already. The best part is, it only took us two and a half days.

The main thing I am on with now is a ripoff of MillionDollarHomepage. Personally I don’t think this is going to take off now, because it’s been a while since MDH was in the limelight but you never know. We had a brainstorming session about it last week and I finally started on it earlier this week. I still don’t have a great idea of where we’re going with it but it’s coming together nicely, even after just a couple of days.