Connecting Tech Pros Worldwide Forums | Help | Site Map

hiding or making detail data visible on clicking a link

Newbie
 
Join Date: Jan 2007
Posts: 8
#1: Jan 24 '07
what I actually want is there should be 2 links at tha top of the page Hide and show.

Default should be hide.
on clicking it the titled data should not show details and on clicking show, the title should show detail data. these options should be links not buttons.
for eg. in case of a shopping software,
the default page should show customer names and on clicking show it should show all the customers total items bought details which includes item , rate ,date and all

Lives Here
 
Join Date: Sep 2006
Posts: 12,070
#2: Jan 24 '07

re: hiding or making detail data visible on clicking a link


Quote:

Originally Posted by inquisitivemind

what I actually want is there should be 2 links at tha top of the page Hide and show.

Default should be hide.
on clicking it the titled data should not show details and on clicking show, the title should show detail data. these options should be links not buttons.
for eg. in case of a shopping software,
the default page should show customer names and on clicking show it should show all the customers total items bought details which includes item , rate ,date and all

I assume these pages you are talking about are html pages in which case you want to hide things using Javascript?
Familiar Sight
 
Join Date: Dec 2006
Posts: 157
#3: Jan 24 '07

re: hiding or making detail data visible on clicking a link


Quote:

Originally Posted by inquisitivemind

what I actually want is there should be 2 links at tha top of the page Hide and show.

Default should be hide.
on clicking it the titled data should not show details and on clicking show, the title should show detail data. these options should be links not buttons.
for eg. in case of a shopping software,
the default page should show customer names and on clicking show it should show all the customers total items bought details which includes item , rate ,date and all

Hi,
Below is a very simple piece of code to hide an Html element(here I've used a dropdown for demonstration)

[HTML]<HTML>
<HEAD>
<script language = "javascript">
function hide(){
document.getElementById("Id").style.visibility = "hidden";
}
</script>
</HEAD>
<BODY>
<Form name = "Demo">
<select size="1" id = "Id" name="NamesDD" style="position: relative; width: 277; height: 277">
<option selected>Select</option>
<option>ABC</option>
<option>XYZ</option></select>
<input type="button" value="Hide" name="Hide" onClick = "return hide()">
</BODY>
</HTML>[/HTML]
Lives Here
 
Join Date: Sep 2006
Posts: 12,070
#4: Jan 24 '07

re: hiding or making detail data visible on clicking a link


Quote:

Originally Posted by abctech

Hi,
Below is a very simple piece of code to hide an Html element(here I've used a dropdown for demonstration)

[HTML]<HTML>
<HEAD>
<script language = "javascript">
function hide(){
document.getElementById("Id").style.visibility = "hidden";
}
</script>
</HEAD>
<BODY>
<Form name = "Demo">
<select size="1" id = "Id" name="NamesDD" style="position: relative; width: 277; height: 277">
<option selected>Select</option>
<option>ABC</option>
<option>XYZ</option></select>
<input type="button" value="Hide" name="Hide" onClick = "return hide()">
</BODY>
</HTML>[/HTML]

Yeah it seems the OP wants Javascript so I'll move this to the Javascript forum
Reply


Similar JavaScript / Ajax / DHTML bytes