Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hiding Fields 1

Status
Not open for further replies.

perlone

Programmer
May 20, 2001
438
US
Please go to the following URL to see what i'm saying:


If the user clicked the Use Random box, I want to hide/disable the Password field. For example, if you're not a member on tek-tips.com and if you post a message, the "Email Notfication" field will be hidden. Any idea how to do this that works both with IE and Netscape? Thanks for your time.


----------------------------------------
There is no Knowledge, That is not power.

Yes, i'm a SQL Newbie.
-Aaron
----------------------------------------
 
You can use javascript and layers (hide/unhide) although I don't know if you can do that with check boxes. Tek-Tips is written in ColdFuson which allows them to check a database to see if you are a member, and then the pages coded with a lot of if/then statements. DeZiner
gear.gif width=45 align=left
When the gears stop turning,
we all stop learning.
 
hie
AaronGeorge, here is a little example on how 2 hide some field on the page (in this case it is abutton, but it can be anything u want)

<HTML><HEAD><TITLE>hide a button</TITLE>
<SCRIPT LANGUAGE=&quot;JavaScript&quot;>
<!--
var NC=(document.layers)?true:false
function setVis(v){
var oobject
if (document.all){ oobject=document.all.l3.style;}
else if (document.layers){
oobject=document.layers.l1;
}
oobject.visibility=(v)?(NC?&quot;show&quot;:&quot;visible&quot;):(NC?&quot;hide&quot;:&quot;hidden&quot;)
alert(document.forms.f1.b1.style.visibility)
}
//-->
</SCRIPT>
</HEAD>
<BODY>

<form name=f1>
<input type=button value='make visible' onclick=&quot;setVis(true)&quot; name=b1>
<input type=button value='make invisible' onclick=&quot;setVis(false)&quot;><br>
</form>

<ilayer id='l1' ><layer id='l2' ><div id=l3 style='position:relative'><form name=newf><input type=button value='appearing' onclick=&quot;&quot;></form></div></layer></ilayer>
</BODY>
</HTML>

but note, that in netscape every layer has its one separate document object, so, 2 make it work in netscrap, u'll have 2 write it like i did (i meen u'll have more than 1 form, in eavh layer u'll have different form)
regards, vic
 
Thank you. ----------------------------------------
There is no Knowledge, That is not power.

Yes, i'm a SQL Newbie.
-Aaron
----------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top