Subscribe: Comments on: Optimal OPML Browser Released
http://www.yabfog.com/wp/2006/02/23/optimal-opml-browser-released/feed/
Added By: Feedage Forager Feedage Grade B rated
Language: English
Tags:
classname  display  document tmp  expand  expansionstate  style display  style  tmp classname  tmp document  tmp length  tmp style  tmp 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: Comments on: Optimal OPML Browser Released

Comments on: Optimal OPML Browser Released



Dan MacTough's Personal Site



Last Build Date: Wed, 22 Jun 2016 19:36:08 +0000

 



By: Dan

Sat, 25 Feb 2006 21:53:41 +0000

I'd also like to look to the source OPML for that info, too. After all, there is an expansionState element in the head element....



By: Dan

Sat, 25 Feb 2006 21:51:51 +0000

Thanks, Matt. I'm not into JavaScript very heavily (which is why it took me so long to get the inclusion working), so I'll take any suggestions. The issue I'm more concerned with at the moment, though, is passing a parameter in the query string along with the url that determines the INITIAL expand/collapse state: something like expansionstate=0 for collapse all, expansionstate=1 to expand the first level, expansionstate=-1 to expand all, etc. To be honest, I think I've got it. I just need to sit down and code it. :)



By: Matt Terenzio

Sat, 25 Feb 2006 21:45:46 +0000

oops less than sign in italics function expandAll(){ tmp = document.getElementsByTagName('div'); for (i=0;itmp.length;i++){ if (tmp[i].className == 'description') { tmp[i].style.display = 'none'; } if (tmp[i].className == 'descriptionlong') { tmp[i].style.display = 'block'; } } } function collapseAll(){ tmp = document.getElementsByTagName('div'); for (i=0;iless thantmp.length;i++){ if (tmp[i].className == 'description') { tmp[i].style.display = 'block'; } if (tmp[i].className == 'descriptionlong') { tmp[i].style.display = 'none'; } } }



By: Matt Terenzio

Sat, 25 Feb 2006 21:43:23 +0000

One possible way (i'm sure you are on it already) which I've used for expanding or collapsing all items in a similar fashion was to use javascript to toggle between CSS classes. I haven't had a chance to look at your code ( i plan on using it shortly), so this might be obvious to you I use functions like this. function expandAll(){ tmp = document.getElementsByTagName('div'); for (i=0;i



By: Dan

Sat, 25 Feb 2006 20:32:16 +0000

Thank you for such a nice compliment, James. I'm actually planning on adding a parameter for the initial expanded/collapsed state, but I haven't decided how to implement it yet. However, if you look at the HTML code, you'll notice that I've got the hierarchical level reflected in the class attribute of each ul element, so I'm already half-way there.



By: James Corbett

Sat, 25 Feb 2006 11:00:55 +0000

Dan, I think this is absolutely brilliant - thank you! Optimal does exactly what I've been asking for lately when I speak of "Feed Grazing" - the ability to browse OPML hierarchies PLUS read feeds. Its a different category of software to Aggregators IMHO, a category that I call Feed Grazers. One question - is it possible to pass a paramater to have the default view fully collapsed? I know, we're impossible to please aren't we! ;->