Win a copy of Practice Tests for OCP Java 17 Certification Exam (1Z0-829) this week in the OCPJP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
Bartenders:
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

removing zero values from a list

 
Ranch Hand
Posts: 1759
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there a neat way of dropping certain (zero) values from an HTML list ?
Without resorting to JavaScript.

Thank you.
[ August 11, 2004: Message edited by: Helen Thomas ]
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need to use JavaScript to manipulate the form element.
 
Helen Thomas
Ranch Hand
Posts: 1759
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, Eric. I was hoping there'd be a DYNAMIC HTML tag that would do the job.
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
DHTML is JavaScript
 
Helen Thomas
Ranch Hand
Posts: 1759
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HTML and CSS as well.
<ul>
<li> .... { <$BlogItemCommentCount$> != 0 } >/li>
</ul>
That's all I want.
There ought to be something brief to cover this sort of requirement.

I admit what I have written up there would be a nightmareto maintain if allowed but there must be something....
 
Ranch Hand
Posts: 823
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Helen,

How are the zeroes getting into your list in the first place? Can't you filter them out at that point?

Jules
 
Helen Thomas
Ranch Hand
Posts: 1759
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello there, Jules.

The list is a summary of a sub-item counts. If an item has no sub-items the list currently displays the zero counts as well. I just want a list of where there are sub-items. But it looks as though I'll have to use Javascript.

Thanks.
 
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic