subsection contents

Selection Frame Demo

Grabber Size:

This little JavaScript application demonstrates how to use layers to simulate a resizable selection frame or grabber.

When the mouse pointer is over the image, a blue selection frame is displayed. The size of the frame is determined by the "grabber size" option in the form.

When you click on the within the confines of the image, a form is submitted and an alert reports the mouse co-ordinates and the current grabber size.

This application should work in Netscape 6 (and later), Internet Explorer 4 (and later), Opera 6 (and later), Mozilla/Chimera, Konqueror 2.2.1 (and later).

Some known issues:

  • Opera 5 (all platforms?) - frame lines only drawn as points
  • IE 5 (MacOS 9) - superfluous space at top of page
  • IE 5.5 (WinNT4) - selector frame lines incorrectly drawn
  • Netscape 4 - mouse-over event not triggered; try an older version instead

Last updated: May 19, 2003