Archive for the 'Web development' Category

Litmus – Web Page and Email Testing Platform

Today I heard about the impending launch of the new incarnation of the SiteVista web page and email testing tool ‘Litmus‘. A quick email later and I got myself a shiny beta invite and took it for a spin (thanks Paul).

There are some screen shots up on the SiteVista blog which give a fair impression of the kind of thing we are talking about here. Some of the features that might not be so obvious from the screen shots are such things as test versioning, public access/collaboration control, the ability to save browser combinations, multi-user collaboration, test histories and I’m sure a whole load of other stuff that I am yet to discover in my limited noodling…

Having tried a couple of the other tools of this ilk (Browsercam, Browsershots, Browsrcamp) I would say that Litmus will definitely ‘raise the bar’ in terms of features, UI and performance.

So… keep your eye on the SiteVista blog and expect some action any day now…

Disclosure: I have worked with the gentlemen of Salted but I am a man of morals and wouldn’t post something here that I didn’t mean.

E-TextEditor V1.0 Released

E-TextEditor, the Windows text-editor inspired by and based upon the bundles for TextMate has come out of beta.

If you haven’t tried it you should give it a whirl. It is definitely the closest us, aesthetically challenged, yesterday’s news Windows users are going to get to the lofty heights of TextMate.

UPDATE: I notice the Powershell tag is pulling a fair few people into this post from Technorati but only a small proportion of visitors are actually clicking through and checking ‘E’ out. If you are searching for a Powershell editor dear reader give it a look. I think this could be the Powershell editor that people have been waiting for. Whilst there isn’t, to my knowledge at least, a Powershell bundle, there will certainly be a demand for one as this editor takes off. As the bundles are coming currently from the Mac world there obviously has been nobody interested in writing Powershell stuff on the Mac. With ‘E’ this will change and the ‘bundle’ set up is very extensible/flexible. Give it a whirl…

Fix Jerky Scriptaculous (Script.aculo.us) Animation Effects

I was adding some BlindDown, BlindUp animation effects to something I was working on today with Scriptaculous and had a bit of an issue with jerky animation. I’ve had this before and ended up ditching them but never really investigated why sometimes they are smooth as nobody’s business and others not.

As it happened, today, I had it working nicely, made a change, and the issue arose, thus leading me to the cause.

It turns out that if you add a BlindDown or BlindUp animation to a div that has padding or a margin set in its CSS as the effect begins to execute the div jumps to the padding/margin size and then the BlindUp/BlindDown (or probably others but I haven’t investigated) works on the remaining ‘area’ of the element.

So this is jerky:

<script language="javascript" type="text/javascript">
    Effect.BlindDown("divJerky");
</script>
<div style="height:50px; padding:10px; display:none" id="divJerky">
    
</div>

The solution is this:

<script language="javascript" type="text/javascript">
    Effect.BlindDown("divJerky");
</script>
<div style="display:none" id="divJerky">
    <div style="height:50px; padding:10px">
    </div>
</div>

If you add the padding to an ‘inner’ div all is well in the world again and everything works smoothly…

I know this isn’t exactly astrophysics but it is Friday afternoon and I’ve only just realised what the issue was so I thought I’d share…

Have a good weekend :)

Clicking more than once may charge your credit card multiple times…

I bought some tickets from the Royal Liverpool Philharmonic Hall (that sounds like I’m all very cultured but, sorry to disappoint, they were for a pirate fancy dress party). At the checkout I was confronted with this:

buy_click_once

Jeysus… Come on. It’s the 21st century for heaven’s sake. Surely this problem has been dealt with before?

Well, yes it has. The common solution is to disable the ‘Buy’ button using JavaScript in its “onclick” handler (or change its text or some such thing). This is probably what I would have done but it has the problem that it falls over if JavaScript isn’t enabled and will incur the wrath of Uncle Dave… You could argue that those without JavaScript enabled probably number less than 10% and then only a tiny fraction of those are going to be trigger happy so it solves the problem more or less. To complement that you could provide a big red warning as above and hide it with JavaScript as the page loads. This would mean it is displayed to those without JavaScript and would be hidden from those with it. This probably fits in with the Unobtrusive JavaScript mantra.

A more meaty non JavaScript solution is to put some sort of form id into a hidden field in the form on the server side when it is first rendered and then store it when the order is first received. Then only process orders that have not already been received. This works but the problem that arises is that after the second, erroneous, click you have to deal with where the user is redirected to so you need to be able to retrieve the order using the hidden value to allow the next page, confirmation or whatever, to be properly served (I can’t use served in this context anymore without thinking of South Park). This requires a bit of thought as the order may not have been processed when the second click is ‘received’ so you may not yet have an order to work against.

So, has anyone else got any bright ideas or should those with an itchy trigger finger be left to suffer the duplicate order fate of their own making?

Classic ASP on Vista/IIS 7.0

I have a couple of classic ASP ‘applications’ that, through the ministrations of some malevolent spirit, keep landing on my desk(top) needing some new feature or other. I didn’t write them and they should have been binned long ago but, despite my protestations, they keep coming back. My work on them can only be described as ‘Turd Polishing’ which is what I would have called this post had I not been keeping an eye on relevant search engine referrals…

So today I found myself having to get classic ASP going on Vista with IIS 7.0 which, it turns out, is an art unto itself. It isn’t even installed for a kick-off, the remedy for which is to go to Control Panel/Programs and Features and then somewhere in there under the ‘Turn Windows features on or off” you’ll find…

IIS_ASP

Emboldened by success having installed the blighter I then spent far too long with everything I tried to do resulting in this…

IIS_ASP_2

…the shoddiness of which led me up the garden path thinking that the moron that had originally written the aforementioned ‘Turd’ had actually included some, albeit ropey, error handling. Don’t be fooled, turns out this is actually the new default IIS error message for script errors. Having worked that out I tracked the error down to this line:

Server.MapPath(“../db/site.mdb”)

(Yes, it uses Access too… I told you – ‘Turd’)

IIS 7.0 doesn’t allow you to use parent paths and so “..” is unacceptable.

For those of you that still have to do the occasional bit of polishing or those others of you that have a treasured bit of beautifully architected ASP 3.0 that you still care for or, heaven forfend, those who are still developing new stuff with it there is a good post on Bill Staples’s blog that will show you how to sort all of that out and get good old ASP 3.0 running on IIS 7.0 on your Vista machine.

CSS Padding and Width…

Is it only me that thinks that the ‘padding’ value of html elements getting added to the width value of html elements is stupid? ‘Margin’, yes that should be added because it is on the outside of the element but if I set a div to be 750px wide I don’t mean it to become 770px wide when I add 20px of padding.

Whose bright idea was that?

Adding “Open with Console” to the context menu…

The other day I discovered that if you hold down the ‘shift’ key whilst right clicking on a directory in the Vista explorer you get a ‘Open Command Window Here’ entry in your context menu. You can do this on XP with a PowerToy or some registry jiggery-pokery but it was nice to have it out of the box in Vista.

Having picked up on the excellent ‘Console‘ from Ben’s post the other day I was back to having to ‘cd’ into directories again so set about rummaging in the registry. So… the fruits of my labours:

Add the key – HKEY_CLASSES_ROOT\Directory\shell\open_console

Set the value of that to whatever you want to appear in the context menu e.g. Open Console Here

Under that add the key HKEY_CLASSES_ROOT\Directory\shell\open_console\Command

Set the value of that to the path to your console.exe with the parameters -d %1 In my case that gave me C:\Program Files\Console 2 Beta\Console2\console.exe -d %1

There you go… You should now have the context menu entry. Right click on a directory and open Console on that directory. Coupled with e – texteditor’s “Open as e Project’ you can have your rails set up running in a jiffy.

I would like to add the ability to open a few tabs in Console from the context menu with the same command and maybe start a server running in one and have another ready for commands but I can’t seem to get that going at the moment as I’m no great shakes in the registry. If anyone could point me in the right direction for that I’d be most obliged… In fact, it would be nice to open the ‘e’ project and the Console tabs avec server etc with the one context menu command, perhaps ‘Open Rails Environment’ but maybe I’m getting carried away there…



Follow

Get every new post delivered to your Inbox.

Join 37 other followers