October 27th, 2006
IE7 has shipped and its probably (by and large) a decent browser now. But of course it wouldn’t be Microsoft if they didn’t mess up something. First in what will probably be a long line of security related “features”, Microsoft have decided to modify the way that the good old JavaScript prompt works.
The reason? Phishing sites impersonating or even superimposing themselves on real web sites were using the prompt to lure gullible users into providing credit card numbers, passwords and all sorts of powerful data. So now whenever a web page wants to use a prompt you have to click on the unnoticeable security bar at the top of the browser and “allow” temporary access. To make matters worse the prompt presented is ugly and out of place.
I’m not saying that a prompt is the best way to ask the user for data, but given the whole Web 2.0 movement there are numerous occasions where the prompt is a useful and elegant solution to on-the-fly input. The worst part is that the unscrupulous underbelly of the internet will end up using a modal window or a clever floating div about 15 seconds after they realize their old technique doesn’t work and then who loses? Why, the web 2.0 programmer that thought a JavaScript prompt was a no-brainer in terms of cross-browser support.
Phishing works because people are stupid, making your browser idiot-proof is a surefire way to drive yourself crazy.
Score one for stupidity.
Tags: IE, javascript, stupid
Posted in Code | Leave a Comment »
October 18th, 2006
Started messing with the most excellent Scriptaculous JavaScript library yesterday and almost immediately ran into a very frustrating problem. The Draggable Class exposed by the library has some annoying behavior built in by default. When you set revert to true it has this animation where it moves back to its original location.
I was trying to build a drag and drop toolbox and the effect I was looking for was along the lines of dragging it and dropping it into a particular location and then it reappearing back at the original location. So the toolbox lets you drag individual items over to the main area and then the item reappears where it was taken from.
Well after several hours of digging around in the internals of the Scriptaclous JavaScript files I have the solution, so here it is for the rest of humanity to enjoy:
new Draggable(element,{revert:true, reverteffect: function(element, top_offset, left_offset) {
toff = top_offset;
loff = left_offset;
new Effect.Fade(element, {duration: 0.75, afterFinishInternal: function (effect) {
new Effect.Move(effect.element, {x: -loff, y: -toff, duration: 0.0, afterFinishInternal: function(effect) {
new Effect.Appear(effect.element, {duration: 0.75})
}}) }}) }});
The Fade and Appear durations can be tweaked but I found 0.75 to be perfect for what I was trying to achieve. I’ll probably post a link to the finished app when I’m done.
Tags: javascript, prototype, script.aculo.us
Posted in Code | Leave a Comment »
October 10th, 2006
Picked up a new 500 gig SATA drive a couple of days ago and did the mandatory Windows XP reinstall. Imagine my surprise when I discovered that there is no way to copy all my email accounts over to the new installation.
Turns out that you can do it relatively easily if you know where to look. All you need to do is export this registry key from the old Windows Install:
HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\Outlook
Load it in your new installation and voila! All your settings are imported to the new copy of Outlook. Way to go Microsoft, yet another baffling user experience.
Tags: mail, outlook, reinstall, transfer
Posted in Windows | 1 Comment »