Re: lights are on, no one's in.

"Jonathan Chetwynd":
> One can check if the user agent supports a given snippet.
> However is there anyway to check if the user has access to a given i/o
> device?
>
> ie a mouse, mousewheel, etc

Of course not, and even if there was, there's no way to tell if they
actually are actually able to use the one they have got.   The most you
can do is check to see if the UA supports things, but that's no guarantee
that the user can (or even the actual system, consider Jaws, it changes
radically how IE works).  Anything that you need to know about a user
cannot be gained by a computer, and I would also oppose anything that
went in this direction (it's putting an undue burden on users to describe
their situation, whilst I'm very keen on educating users, I don't think
it's feasible.)

You just need to ensure that even if it's there but there's no mousewheel
it is still usable.

> My current project is designing a toolbar.
> If a mousewheel is available many of the options are hidden, if not
they are
> shown.(hence)
> This dramatically effects the GUI.
>
> The pre-beta, is here: http://www.peepo.com/2k1/mousewheel/

Please start off with good scripting techniques, try and get into the
habit of using object detection. IIRC Konquerer supports mousewheel and
document.all, but I'm pretty sure it will error on your script. and
onload="defaultEvents" doesn't do what you think...

This is better - also remember that all browsers which support mousewheel
also support at least a subset of HTML DOM1/2 so using these will future
proof your code rather than the obsoleted (and slow) document.all
approach.

var ImageNumber = 1;
function shiftUpDown() {
  d=document
  ImageNumber = countRotations(ImageNumber);
  if (objImage && objHref && d.images && d.links) {
   objImage.src=d.images[ImageNumber-1].src
   objImage.alt=d.images[ImageNumber-1].alt
   objHref.href=d.links[ImageNumber+1].href
   window.status=objImage.alt
  }
  return false;
}


function countRotations(addRotations) {
  if (event && Number(event.wheelData)==event.wheelData) {
   addRotations += event.wheelDelta/120;
  }
  return addRotations;
}

Received on Wednesday, 7 November 2001 07:14:15 UTC