Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How to hide table rows and show them when user click a different row?

Reply
Thread Tools

How to hide table rows and show them when user click a different row?

 
 
RA
Guest
Posts: n/a
 
      02-19-2004
Hi

I want to have a FAQ so that when the user clicks the question the answer
will be shown below the questions. How do I do it? I use c# with asp.net.

Thanks


 
Reply With Quote
 
 
 
 
Jon
Guest
Posts: n/a
 
      02-19-2004
Hi,
that's probably a client side thing. Something like
<script type="text/javascript">
function showFaq(id){
if(!document.getElementById){return;}
else{
s=document.getElementById('answer'+id);
s.style.display='block';}}

function hideAllFaqs(){
if(document.getElementById && !window.opera){
document.write('<style>#questions div{display:none;}</style>')}
}
</script>
<body onload="hideAllFaqs();">
<div id="questions">
<p><a onclick="showFaq('1'); return false;" href="javascript:;">Why Is
That?</a></p>
<div id="answer1">Just Because</div>
<p><a onclick="showFaq('2'); return false;"
href="javascript:;">When?</a></p>
<div id="answer2">Sometime</div>
etc

Jon

"RA" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi
>
> I want to have a FAQ so that when the user clicks the question the answer
> will be shown below the questions. How do I do it? I use c# with asp.net.
>
> Thanks
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hide the Gridview Rows and Header rows in Button click VijayRama ASP .Net 2 10-12-2009 01:58 PM
Show Hide Table(s), Rows & Cells w/out a postback JDP@Work ASP .Net Web Controls 0 04-20-2006 03:32 PM
How to hide/show the rows of a table depending on the value selected by a user from a drop down list?? riteshjain82@gmail.com Javascript 4 02-16-2006 06:03 PM
how to Hide TABLE rows by grouping them into DIV? Wang, Jay Javascript 9 08-02-2004 10:54 PM
Dynamically Show/Hide table rows? Harry Javascript 3 09-03-2003 06:15 PM



Advertisments