Hi!I don’t know how I can hide and show fields on web. I have form with 2 field: name, age, and hotspot HIDE. If I click on hotspot, I want to hide my fields, and to display hotspot SHOW. In notes it’s very simple. How can I do this on web?
Subject: Hide&Show field on web
Hai, U Take a field STATUS:-
Set the Default value =0
and on the hot spot
write
@setfield(“status”;“1”)
Now on the Field Hide Prperty write the code
status=1
It will hide the fields
Hope that will help u
Pawan
Ok
Subject: RE: Hide&Show field on web
Hm,ok. It’s good idea. But command @setfield doesn’t work on web. If i have formule under hotspot on web, i can’t clik it. If i use java script - it’s ok. I did, how you told me. I have field status, but on the hot spot i wrote:
document.forms[0].status.value=1;
This commend set my field status, but my field aren’t hidding. Field Hide Property set status = 1.
Subject: Hide&Show field on web
You can set some hidden field value on hotspot click and based on the hidden field value can hide the other fields…
Subject: Hide&Show field on web
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.)
Collin
Subject: RE: Hide&Show field on web
I use the below code that works well (Not my code but works)
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”);
Subject: RE: Hide&Show field on web
Pretty much the same.Another good example is how R6 does sections on the web.
Collin
Subject: RE: Hide&Show field on web
Hm, if i copied this code to may form, and i try to hide my field, i get error in line:document.all[id].style.display = “none” (function hide).
Message call: “document.all[…]” is empty object.
Why?
I use IE 6.0.2… or Mozilla Firefox 1.0.
Subject: RE: Hide&Show field on web
Thx. It’s work good.I must now to hid only my field, when I open document, because I don’t want to see fiel first I open it. How can I make this?
Subject: RE: Hide&Show field on web
On the appropriate piece,set the “display=none;” to begin