Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Javascript expan collapse div

Posted on 2006-07-08
3
Medium Priority
?
3,778 Views
Last Modified: 2008-01-09
Hello experts,

I am in need of javascript source code that would do the follwoing for me;-

http://www.obout.com/t2/ht_howto.aspx


Many Thanks
0
Comment
Question by:claracruz
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 4

Assisted Solution

by:Meritor
Meritor earned 600 total points
ID: 17064751
Here is the solution:

<html>
<script>
function showHide(val1,val2)
{
  document.getElementById('table1').style.display=val1;
  document.getElementById('show').style.display=val2;
  document.getElementById('hide').style.display=val1;
}
</script>


<div onClick="javascript:showHide('block','none');" id="show" style="display:block;cursor:hand;border-width:1;border-style:solid;">Click here to Show</div>
<div onClick="javascript:showHide('none','block');" id="hide" style="display:none;cursor:hand;border-width:1;border-style:solid;">Click here to Hide</div>
<Table id="table1" width=100% style="display:none;cursor:hand;border-width:1;border-style:solid;">
<TR>
<TD>
* your Stuff<br>
* your Stuff<br>
* your stuff
</TD>
</TR>
</table>
</html>
0
 
LVL 30

Accepted Solution

by:
callrs earned 800 total points
ID: 17065605
>>I am in need of javascript source code
Simple: In Internet Explorer, do this:
- View > Source
- Or hit the Edit button in the IE toolbar
0
 
LVL 16

Assisted Solution

by:OliWarner
OliWarner earned 600 total points
ID: 17065650
Moo.fx does a similar sort of thing with a small(ish) bit of JS and less markup in your HTML... It also looks nicer and lets your user know what's going on better... Its free so have a look:

http://moofx.mad4milk.net
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Suggested Courses

596 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question