473,721 Members | 1,778 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Expandable dynamic folder using CSS instead of Javascript ?

Mel
if you know of dynamic expandable folder using CSS and display function,
please drop me a note

Yours,
Mel
Jul 20 '05 #1
15 3697
"Mel" <jm**@redolive. com> wrote:
if you know of dynamic expandable folder using CSS and display function,
please drop me a note


Since CSS doesn't provide a way for interaction with one element to
alter the style of another element, this can't be done.

--
Harlan Messinger
Remove the first dot from my e-mail address.
Veuillez ôter le premier point de mon adresse de courriel.
Jul 20 '05 #2
Harlan Messinger <hm************ *******@comcast .net> writes:
"Mel" <jm**@redolive. com> wrote:
if you know of dynamic expandable folder using CSS and display function,
please drop me a note


Since CSS doesn't provide a way for interaction with one element to
alter the style of another element, this can't be done.


<div class="upper">
<div class="lower">
</div>
</div>

..lower { /* default style */ }
..upper:hover .lower { /* altered style */ }

Browser support varies, obviously. I'd hesitate to say the request
above can't be done, but it'd take quite a bit of effort to get a good
implementation of it if it is possible.

--
Chris
Jul 20 '05 #3
Chris Morris <c.********@dur ham.ac.uk> wrote:
Harlan Messinger <hm************ *******@comcast .net> writes:
"Mel" <jm**@redolive. com> wrote:
>if you know of dynamic expandable folder using CSS and display function,
>please drop me a note
Since CSS doesn't provide a way for interaction with one element to
alter the style of another element, this can't be done.


<div class="upper">
<div class="lower">
</div>
</div>

.lower { /* default style */ }
.upper:hover .lower { /* altered style */ }


Um. As far as mouse-overs are concerned, I was technically mistaken.
This still isn't practical though--the altered style goes away as soon
as you move the mouse away from the upper div. That's no no good for
an expanding folder motif, which calls for persistence of the expanded
state. It also calls for activation by click rather than by hover. It
needs basically to maintain state--open or closed--for the contents of
each folder, and CSS doesn't provide this.

Browser support varies, obviously. I'd hesitate to say the request
above can't be done, but it'd take quite a bit of effort to get a good
implementati on of it if it is possible.

--
Harlan Messinger
Remove the first dot from my e-mail address.
Veuillez ôter le premier point de mon adresse de courriel.
Jul 20 '05 #4
Mel wrote:
if you know of dynamic expandable folder using CSS and display
function, please drop me a note


As other posters have mentioned, implementing a tree structure with pure CSS
isn't practical, given that it can't act on mouse clicks, etc.

I have a tree solution which uses javascript to capture events, but then
uses CSS to hide/display nodes, style the +/- boxes, etc. You can test it
out at http://www.JavascriptToolbox.com/mktree/

--
Matt Kruse
Javascript Toolbox: http://www.JavascriptToolbox.com/
Jul 20 '05 #5
Matt Kruse wrote:
I have a tree solution which uses javascript to capture events,
but then uses CSS to hide/display nodes, style the +/- boxes, etc.
You can test it out at http://www.JavascriptToolbox.com/mktree/


Um, using IE5.1 on Mac OS9.2.2, after reading the text about how it
degrades gracefully, I clicked the "Collapse All" link... and up popped
a JavaScript error message:

Microsoft JScript runtime error:
Line: 28
Char: 100
Error: 'nodeClosedClas s' is undefined

Then the browser crashed. I re-launched the browser, and tried again...
and the same thing happened again.

I'm not trying to start a JS discussion in a CSS newsgroup, but since
you mentioned it...
Jul 20 '05 #6
Jonas Smithson wrote:
Um, using IE5.1 on Mac OS9.2.2, after reading the text about how it
degrades gracefully, I clicked the "Collapse All" link... and up
popped a JavaScript error message:


Hmm, I've not seen that before (since I don't have IE5.1 on mac to test
with). I'll keep it noted and try to fix it if I can get access to that
browser to test. IE on Mac tends to have quite a few javascript quirks, and
it's annoying to code for. Especially versions < 5.5. You may want to
upgrade :)

--
Matt Kruse
Javascript Toolbox: http://www.JavascriptToolbox.com/
Jul 20 '05 #7
Matt Kruse wrote:
IE on Mac tends to have quite a few javascript quirks, and it's
annoying to code for. Especially versions < 5.5. You may want to
upgrade :)


(ahem) Upgrade to what, exactly? There is no version greater than 5.2
for the Mac. And there won't be, either. MS announced some time ago that
would not develop any new versions of their browser for the Mac platform.

--
Brian (remove ".invalid" to email me)
Jul 20 '05 #8
Brian wrote:
(ahem) Upgrade to what, exactly? There is no version greater than 5.2
for the Mac.


Ah, you're right, 5.2.1 is the latest version. I get the minor versions
mixed up sometimes (since I avoid macs at all costs). No one should be using
IE on mac anymore anyway, IMO. There are better options available :)

--
Matt Kruse
Javascript Toolbox: http://www.JavascriptToolbox.com/
Jul 20 '05 #9
Matt Kruse wrote:
No one should be using IE on mac anymore anyway, IMO. There are
better options available :)


It's not up to us, of course, which browser people use -- perhaps they
must use a certain browser per company rules, perhaps they like what
they have. In any case, IE 5.x/Mac is not the worst browser they could
be using. It has fairly good css support, better than the Win versions.
The problem is that its bugs are different then those of other browsers.
But every browser has its unique little quirks.

--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/
Jul 20 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
4080
by: Ralf Höppner | last post by:
Does anyone know, if it is possible to create an explorer-like expandable tree from an XML File ? Maybe using XSLT ? I'd like to use it on an HTML web page. thanks ! Ralf
13
2895
by: mr_burns | last post by:
hi, is it possible to change the contents of a combo box when the contents of another are changed. for example, if i had a combo box called garments containing shirts, trousers and hats, when the user selects shirts another combo box called 'size' would contain sizes in relation to shirts (ie. chest/neck size). the same would occur for trousers and hats. when the user selects an option in the garment combo box, the options available...
4
6034
by: Doug | last post by:
Hi - I'm looking to code some javascript that has an event handler tied to an image ("a down arrow") that will expand code that was hidden on the page load. It's pretty simple, I have an accessories html table that I want to load in the html but hide to save page real estate until you click the "down arrow" image. I know I've seen stuff like this before, can anyone point me to an example of this or give me an idea of how to code it? ...
2
3225
by: Alfonso Morra | last post by:
Hi, I want to create a container structure (array/list etc), that is expandable. Currently, I have static arrays like this SomeStruct *ptrArray ; What I want to do is to be able to use ptrs to ptrs like so:
5
2357
by: KitKat | last post by:
I've got two queries; one is a modification of an older query; the other I created from scratch. The old one is about 5 copies down the road from something that has been expandable when I'm in View mode--it showed the Points of Contact for records whose Begin Date was in a form-selected (or manually inputted) year. That used to be all it did. Then copied it, took out the year criterion, and changed "POC" to show the Director field...
1
9161
by: axlq | last post by:
I've seen a lot of examples of expandable/collapsable lists, such as these nice examples: http://www.karlnelson.net/nestedlists/ and http://dynamicdrive.com/dynamicindex1/navigate1.htm They use javascript of course, and that's the problem. There's no graceful degradation with javascript disabled. Any links in the hidden sub-items will become inaccessible.
16
2015
by: kdeguero | last post by:
I am using the following script for expandable divs but ...the focus is on the top of the page ie..the div id #quiz, and I am trying to use if for a lengthy FAQ page. when you scroll to the bottom of the page and open a question, the focus pops back to the top of the page. I thought of defining several sections, but when I do only one is collapsed, the others are open on page load <script language="JavaScript" type="text/JavaScript"> ...
9
2982
by: pbd22 | last post by:
Hi. This is just a disaster management question. I am using XMLHTTP for the dynamic loading of content in a very crucial area of my web site. Same as an IFrame, but using XMLHTTP and a DIV. I got the core of the javascript from here: http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm I noticed in the demo that sometimes the content takes a long
8
2716
by: Don Li | last post by:
Honestly have not touched CSS for years, so, back to square one on this... What I'd like to do if possible with CSS is this: create a layout that is shrinkable or expandable when a user drag it, kind of like a window on a desktop, you can drag it to make it bigger or smaller... so, the content within would also be proportionally shrunk or expanded... Is it possible with CSS? If so, could you show an example?
0
8834
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9212
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9127
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6664
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5973
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4483
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4748
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2569
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2127
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.