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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Making a link disappear in a category menu

Status
Not open for further replies.

Perceval

Technical User
May 6, 2002
5
US
Hi,

I have a category menu that makes two browse boxes appear in a page. This happens when clicking on the link "Click here to add more files." I want this link to disappear once the user clicked on it, so that one can only see the two browse boxes but not the link anymore. Thanks in advance for any advice.

Perceval


/*******************
/Javascript function
/*******************/

function controlExpand(){
var sup = event.srcElement.id;
if (sup != ''){
var sub = document.all[(sup + "Sub")]
if (sub != null){
if (sub.style.display == 'none')
sub.style.display = '';
else sub.style.display = 'none';
}
}
}
}

/*********
/HTML code
/********/

<div onClick = &quot;controlExpand()&quot;>

<a style=&quot;cursor:hand&quot; target=&quot;_self&quot; name =&quot;admin&quot;
title=&quot;MoreFiles&quot;><div id = &quot;mFiles&quot;>Click here to add
more files</div></a>

<div style=&quot;margin-left:54; font-size:x-small&quot;>
<div id = &quot;mFilesSub&quot; style = &quot;display: none;&quot;>

<br><div id = &quot;file2&quot;><font face=&quot;TimesNewRoman&quot;
size=&quot;3&quot; class=&quot;heading&quot;>Configuration File
2:</font><input type=&quot;File&quot; name=&quot;FileToUpload2&quot;
size=&quot;25&quot; maxlength=&quot;255&quot;></div>

<br><div id = &quot;file3&quot;><font face=&quot;TimesNewRoman&quot;
size=&quot;3&quot; class=&quot;heading&quot;>Configuration File
3:</font><input type=&quot;File&quot; name=&quot;FileToUpload3&quot;
size=&quot;25&quot; maxlength=&quot;255&quot;></div>

</div>
 
<script language=&quot;javascript&quot; type=&quot;text/javascript&quot;>
function show_div(name_id) {name_id.style.visibility = &quot;visible&quot;;}
function hide_div(name_id) {name_id.style.visibility = &quot;hidden&quot;;}
</script>

<div id=&quot;thediv&quot; style=&quot;visibility: visible&quot;>
<a href=&quot;javascript:hide_div(thediv)&quot;>test</a>
</div>

<br>
<a href=&quot;javascript:show_div(thediv)&quot;>show back</a> ---------------------------------------
wmail.jpg


someone knowledge ends where
someone else knowledge starts
 
Thanks a lot. It's working perfectly well.

Perceval
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top