I used a menu in my web page but it can't over the listbox under it. How can I do?
Apr 5th, 2008 19:30
ha mo, Dave Clark, Nguyen Nam Trung,
Sorry, it is not possible to cover a FORM element that is not hidden in
some other fashion. You see, FORM elements are not really HTML
objects. In Windows, at least, they are Windows objects that are
reused by the browser *as* FORM elements. Thus, these operating system
objects do not have z-index attributes -- as other HTML objects do --
and, therefore, they cannot be covered by normal HTML objects.
The solution? You will have to simultaneously hide any FORM elements
that are in the way of your menu. For example (in IE):
var fld = document.formName.fieldName;
fld.style.visibility = "hidden"; // or "visible"
Since NS4 does not support hiding a single FORM element, you would
have to place the entire FORM within a DIV layer and hide the entire
FORM by hiding just the DIV layer. For example (in NS4):
var myDiv = document.layers["divID"];
myDiv.visibility = "hide"; // or "show"
This would, however, create added complexity to addressing your FORM.
NS DIV layers have their own document object, so a "normal" FORM field
reference like this:
would have to, when within an NS DIV layer, be referenced as follows: