Reply
Wanted:someone who knows the code for...
Old 06-28-2006, 05:53 PM Wanted:someone who knows the code for...
Novice Talker

Posts: 14
Location: Missouri
Hi, I am wanting to know if there is any fairly simple code for something.

Go to:
http://www.net10.com/questions.jsp?n...sk=questions#y

Then click on a question.

See how the question opens up a little box with the answer right under it? Then closes when you click on another question or you can close it by clicking on the "X"?
I am wanting to make my FAQ's page like this.
Can anyone give me the code for this.
I am very new at this so you'll have to give me any code needed and tell me where it goes. I am not sure if this is all in one page or if I will need a new page for each answer.

Thanks in advance for any help.
spiritlady is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 06-28-2006, 07:09 PM Re: Wanted:someone who knows the code for...
mgraphic's Avatar
Truth Seeker

Latest Blog Post:
Wireless Audio
Posts: 2,322
Name: Keith Marshall
Location: West Hartford, CT
Here is an easy solution:

Code:
<script language="javascript" type="text/javascript">
  
  function switchMenu(obj) {
   
    var el = document.getElementById(obj);
    if (el.style.display != 'none') {
      
      el.style.display = 'none';
      
    } else {
     
      el.style.display = '';
    }
  }
  
</script>
<a href="#" onclick="switchMenu('a');">Topic One</a>
<div id="a" style="display: none;">
  This is content for topic one.
</div><br />
<a href="#" onclick="switchMenu('b');">Topic Two</a>
<div id="b" style="display: none;">
  This is content for topic two.
</div><br />
<a href="#" onclick="switchMenu('c');">Topic Three</a>
<div id="c" style="display: none;">
  This is content for topic three.
</div><br />
<a href="#" onclick="switchMenu('d');">Topic Four</a>
<div id="d" style="display: none;">
  This is content for topic four.
</div><br />
__________________

<mgraphic /> - I don't have a solution but I admire the problem.
mgraphic is offline
Reply With Quote
View Public Profile
 
Old 06-28-2006, 07:41 PM Re: Wanted:someone who knows the code for...
Novice Talker

Posts: 14
Location: Missouri
Thanks! That works great!
spiritlady is offline
Reply With Quote
View Public Profile
 
Old 06-29-2006, 08:44 PM Re: Wanted:someone who knows the code for...
jason_bristol's Avatar
Extreme Talker

Posts: 247
Name: Jason Eyermann
Location: england bristol
wow. That bit of javascript (I don't know any javascript) is cool. I think i'll keep that in my archives if thats ok. I should start learning how to do that.
__________________
My Site/Blog - AspireCreate.com
jason_bristol is offline
Reply With Quote
View Public Profile Visit jason_bristol's homepage!
 
Reply     « Reply to Wanted:someone who knows the code for...
 

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

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




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.11900 seconds with 12 queries