Austin,
it's very difficult to see what you're trying to achieve
from the
example you've sent, but try changing this
"el.style.display = '';" to
"el.style.display = 'block';"
Rob.
-----Original Message-----
From: 1stJavaScript@yahoogroups.com
[mailto:1stJavaScript@yahoogroups.com] On
Behalf Of austink_2004
Sent: 11 January 2006 15:21
To: 1stJavaScript@yahoogroups.com
Subject: [1stJavaScript] Expand / Collapse div
Hi All,
I am trying to create an expand / collapse div functionality
in my web page.
The data is database driven, and goes down 3 levels.
(grandparent, parent and
child... some have only one level, some have two and some
have three)
// el.style.display = 'none';
// }
// else {
// el.style.display = '';
// }
//}
//-->
</script>
The display value does toggle, however, the code doesn't
expand/collapse the items
Any ideas as to what would be wrong with this script?
Thanks
Austin
For a quick response, your message should include,
- A copy of the code
- A copy of any error messages
- A description of what you're trying to achieve
- A description of what's actually happening
http://www.trans4mind.com/personal_developmen
t/HTMLGuide/index.html For HTML
http://www.trans4mind.com/personal_developme
nt/JavaScript/index.html For
JavaScript
You can also download the JavaScript and HTML tutorials
(Nearly 2.5
megabytes.)
A 30 day version of jsEditor is available for free download
at
http://www.trans4mind.com/personal_devel
opment/JavaScript/freeEditor.htm
--------------------------
FREE zip/unzip program:
http://www.trans4mind.com/personal_development/z
ipper/index.html
--------------------------OR go to and change your settings:
http://g
roups.yahoo.com/group/1stJavaScript/
List owner: 1stJavaScript-owner@yahoogroups.com
://groups.yahoo.com/group/1stJavaScript/
List owner: 1stJavaScript-owner@yahoogroups.com
Yahoo! Groups Links
************************************************************
***********************
Any opinions expressed in email are those of the individual
and not necessarily those of the company. This email and any
files transmitted with it are confidential and solely for
the use of the intended recipient or entity to who they are
addressed. It may contain material protected by
attorney-client privilege. If you are not the intended
recipient, or a person responsible for delivering to the
intended recipient, be advised that you have received this
email in error and that any use is strictly prohibited.
Random House Group +44 (0) 20 7840 8400.
http://www.randomhouse.c
o.uk
http://www.booksat
transworld.co.uk
http://www.kidsatr
andomhouse.co.uk
************************************************************
***********************
For a quick response, your message should include,
- A copy of the code
- A copy of any error messages
- A description of what you're trying to achieve
- A description of what's actually happening
http://www.trans4mind.com/personal_developmen
t/HTMLGuide/index.html For HTML
http://www.trans4mind.com/personal_developme
nt/JavaScript/index.html For JavaScript
You can also download the JavaScript and HTML tutorials
(Nearly 2.5 megabytes.)
A 30 day version of jsEditor is available for free download
at
http://www.trans4mind.com/personal_devel
opment/JavaScript/freeEditor.htm
--------------------------
FREE zip/unzip program:
http://www.trans4mind.com/personal_development/z
ipper/index.html
--------------------------OR go to and change your settings:
http://g
roups.yahoo.com/group/1stJavaScript/
List owner: 1stJavaScript-owner@yahoogroups.com
://groups.yahoo.com/group/1stJavaScript/
List owner: 1stJavaScript-owner@yahoogroups.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://g
roups.yahoo.com/group/1stJavaScript/
<*> To unsubscribe from this group, send an email to:
1stJavaScript-unsubscribe@yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.c
om/info/terms/
|