PDA

View Full Version : z-index questions for form elements and highlitghting


BrightNail
05-04-2003, 12:30 AM
Hey,

I am creating a page ifor an application that uses a custom browser. The browser uses js 1.4 and css 2, but there is no mouse, so it uses arrows to reiterate over form elements and links...NOW,

This page uses tons of layers and such....I notice that even thought I 'see' the layer, the form element or link doesn't 'highlight', but other layers do...

I am thinking it is the z-index..or an issue related.

IF I used the 'show/hide' feature for layers, does that make any other layers that reside on the same layer inaccessible ??

IN other words...lets say I have a z-index of 5 for 6 seperate layers that have diff. form and link element in each one....

Lets say I load div 3, then I hide it, and load div 6...will potentially both of them be inaccessible because perhaps div1 was loaded initially???? You see what I mean....even though I am 'hiding' a previous layer, does it 'really' go away so that the form elements and such that in the preset "show" layer are ALL accessible????

what considerations should I be aware of with the z-index...Is there a way to always send the previous layer to z-index=1 so that the "show" layer is ALWAYS on the top????

curious...also, thanks for all my previous questions that were answered.

BrightNail
05-05-2003, 05:32 AM
bump....

BrainJar
05-06-2003, 05:51 AM
I believe the focus will move from element to element based on source order, i.e., it depends on where the corresponding HTML tag exists in the page code.

There is a tabindex attribute you can use to set the order explicitly. It should work regardless of any z-index setting. But I'm pretty sure that any element that's hidden is skipped over when you shift focus.

As for layers within layers, when you hide one, everything within it is hidden as well. There is however a bug with some browsers and form inputs that causes the input to always appear on top. See http://www.webreference.com/dhtml/diner/seethru/ for a good, in-depth explanation.