Christian Heilmann

You are currently browsing the Christian Heilmann blog archives for February, 2006.

Archive for February, 2006

PureDOMExplorer update – what is Safari’s issue with Off-Left?

Monday, February 13th, 2006

I just decided to celebrate the sale of a commercial license for my tree menu script pureDOMexplorer by creating a new version, which fulfils the change requests I had in the past. The new version of pde now

  • turns a nested list with the class “pde” into a tree menu – which means you can use it more than once on a page
  • uses fully unobtrusive JavaScript, including addEvent and encapsulation of all functionality in one pde object.
  • creates collapse and expand links and allows the section links to link to a landing page
  • allows for both keyboard and mouse to expand the sections (I still have to fix the tabbing issue over hidden elements)
  • keeps all the look and feel in the CSS - you don’t need to know JavaScript to change the look and feel
  • does not collapse lists that contain a STRONG element – to allow for a “you are here” state in your trees.

You can check and see the new version at the new pureDOMExplorer demo page

Now, it all works fine in MSIE/Opera/Firefox on PC, but on Safari I cannot make the hiding and showing to work without resorting to the inaccessible display block/none solution.

Currently my demo CSS uses the “Off Left” technique, as recommended to be most accessible :


/* The class to hide nested ULs */
.hide{
position:absolute;
top:0;
left:-4000px;
width:1px;
}

/* The class to show nested ULs */
.show{
position:relative;
top:0;
left:0;
width:auto;
}

Update
Ingo Chao took on the challenge and fixed the Safari issue. All working fine now.

Update
Following the requests in the comments to make the parent link also collapse and expand the nested list, I changed the script and added a new parameter called linkParent. If the parameter is false the parent link will point to the document it links to, if it is true, it will collapse and expand the same way the arrows do.

Now this is a cool touchscreen

Sunday, February 12th, 2006

Jeff Han is doing some research on Bi-manual, multi-point, and multi-user interactions on a graphical interaction surface and watching the 17MB demo reel got me hooked on the idea. The accessibility of it of course is not mentionable, but how cool would it be to sort your digital pictures by dragging them with your finger or even use this interface for card sorting exercises resulting in an XML sitemap?

Don’t rely on maxlength to shorten passwords

Monday, February 6th, 2006

It is bad practice to rely on the maxlength attribute of form fields to ensure the real length of entered data. That much I knew, as playing with curl made me aware how vulnerable forms are on the wild wild web.

However, I was a bit agog when I realised that it is possible to change the value of a field to a word longer than maxlength on MSIE and Opera.

I set up a demo that shows how to override maxlength with JavaScript .

So, don’t trust maxlength, make sure to also check the real length on the server side.

Photoshop TV

Monday, February 6th, 2006

Photoshop TV shows tips and tricks on how to use photoshop either in Flash, or as a MP4 download to watch on your newfangled gizmo of choice. Looks fun, and doesn’t cost anything.

Panel Bar or Accordeon Menu using DOMscripting and CSS

Thursday, February 2nd, 2006

A friend of mine asked for a menu like the Outlook Panel in CSS and JavaScript as a proof of concept. I took on the challenge and quickly put together this example of a DOMscripting powered panel menu . It functions the same way – only one section can be open at a time – and should be rather self-explanatory. For a change I am not using off-left to hide the sections but plain old display block and none inside the script, which has the welcome side effect that you can use it with a keyboard without having to tab through the invisible links!

Features:

  • Fully contained unobtrusive JavaScript
  • Option to style JavaScript and non-JavaScript menu independently
  • Option to have predefined open section

I hope it is helpful for some of you, and I appreciate any feedback / bug issues.