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…

Windows Rails Environment

I have been aware for some time that TextMate is the defacto standard editor for Rails folk but have also been aware that there isn’t really a Windows equivalent. As I don’t have a Mac this has been an issue. I have tried loads of editors and all have their good and bad points but I have yet to see anything close to the stuff I have seen done with TextMate.

Yesterday, Dave Verwer posted a Windows alternative on the GeekUp mailing list. I dutifully downloaded it as I always follow Dave’s advice to the letter ;) . Bugger me with the wide end of a rag man’s trumpet if it wasn’t exactly what I was after. The editor in question is ‘e’ which you can get for a snip ($35) at  http://www.e-texteditor.com/

It supports TextMate bundles, has a built in file explorer that can be set to project folders and other goodness and can even be set to have a black background which was the clincher for me.

This morning on my daily peruse of the blogging world I stumbled upon a new post on http://softiesonrails.com which in turn led me to an excellent post by Ben Kitrell which outlines the steps to achieving an all singing all dancing Rails environment on Windows. Nice one Ben… I’ve still got a few bits to add but that sounds the business.

Note to Reader: I have deliberately avoided phrases like ‘Mac-esque’ and the like. Those sanctimonious f’ers are smug enough without giving them further encouragement.

Update on the IE7 Security Flaw

According to Microsoft it doesn’t have one. Apparently, the security issue that I talked about the other day is actually in Outlook Express but can be exploited through Internet Explorer.

That’s OK then…

Run Internet Explorer 6 & 7 together on the same machine.

Web designers need to test their sites on a number of different browsers and one of the big gripes about IE7 is that it doesn’t allow you to leave IE6 on your machine when you install it. The same is true for IE6 and IE5.5, IE5 etc…

Well, here’s how you do it.

UPDATE: After writing this post I realised that the method below is fraught with problems not least of which is the fact that whilst it looks like IE6 I think it is actually using the gubbins from IE7 and it is really slow and buggy anyway. I have since discovered a standalone version of IE6 that is definitely IE6 and actually works… Download it here. I have left my original post below for posterity. Apologies to those of you that wasted your time dicking around with my original instructions…

ANOTHER UPDATE:  Yousif has got an installer that ‘installs’ all previous versions of IE back to 3 as standalone applications. He also gives a couple of registry edits that affect things like conditional comments etc.
<crap>

Before installing IE7 make a copy of the installation directory of IE6 which is usually at C:/Program Files/Internet Explorer. Leave the copy in your Program Files directory and name it Internet Explorer 6 or for that matter whatever you fancy, “Dennis” for example.

After installing IE7 if you run iexplore.exe from your Internet Explorer 6 directory it will just start IE7, unless that is you follow these steps.

Create a new text file called iexplore.exe.local in your Internet Explorer 6 directory. Make sure that you have renamed it correctly and not iexplore.exe.local.txt as this, funnily enough, doesn’t work. (disable “Hide extensions for known file types” in Tools/Folder Options/View if you haven’t already.) The iexpore.exe in your v6 directory will now open up IE6…

</crap>

This is old news but I thought I’d resurrect it in light of the new release of Internet Explorer and the fact that people on the beta forums were still complaining about the lack of support for mulitple versions. It obviously isn’t old news to them.

There are a number of sites detailing how to run IE7 in standalone mode leaving IE6 as it is but I think that is a bit arse about face. You want to install IE7 and have the old version(s) in buggy standalone mode surely…

This works with previous versions of IE which Peter-Paul Koch has kindly hosted for you here along with a list of issues when using this technique.



Follow

Get every new post delivered to your Inbox.

Join 37 other followers