?
Solved

Javascript expan collapse div

Posted on 2006-07-08
3
Medium Priority
?
3,771 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
Originally, this post was published on Monitis Blog, you can check it here . It goes without saying that technology has transformed society and the very nature of how we live, work, and communicate in ways that would’ve been incomprehensible 5 ye…
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:
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
Suggested Courses

777 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