Hi!I try hide and show fields by:
For a fast hide-when …
Put
around the area to be hidden.
Then click a button or a checkbox or whatever
onClick = document.all[ “name” ].style.display = “none”;
… and its complement …
onClick = document.all[ “name” ].style.display = “block”;
(Modify as needed to suit your browser.)
It work well, when i set instead of “document.all[ “name” ].style.display = “none””, i set “document.forms[0].name_field.style.display = “none”;”
First example - doesn’t work.
2 example work good, but i want to hide my field, when doc is open. If i set in
I try 2 way, too.
put this in the JS Header:
form = document.forms[0];
ns4 = (document.layers)? true:false
ie4 = (document.all)? true:false
// Show/Hide functions for non-pointer layer/objects
function show(id) {
if (ns4) document.layers[id].visibility = “show”
else if (ie4) document.all[id].style.display = “inline”
}
function hide(id) {
if (ns4) document.layers[id].visibility = “hide”
else if (ie4) document.all[id].style.display = “none”
}
Put this around the field or collection of fields that you wish to hide
put this in your hotspot
show(“timeschedule”);
or
hide(“timeschedule”);
This case doesn’t work in my form.Why?