Help coderanch get a
new server
by contributing to the fundraiser
  • 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:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Best Approach to Designing a Page of Check Boxes

 
Ranch Hand
Posts: 2232
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am useing the div tag approach on my web page. I have a div tag being populated with a JSP that depending on user input will be populated with a list of check boxes.

The checkboxed represent a list of values from a remote data source.

The number of check boxes will be dynamic and there value(checked or not) will be determined from data source values.

I currently have this working using javascript to build a table.

Would it be better to use JSTL in the JSP to do this?
 
Marshal
Posts: 28289
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would say so. If nothing else it removes the minor problem that your page doesn't work if the client has Javascript turned off. But even if it were mandated that we didn't care about that, I would still do it in JSTL. I reserve Javascript for processing that has to take place on the client.
 
Sheriff
Posts: 67750
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Of course. Why build JavaScript to build the DOM when you can just build the DOM?
reply
    Bookmark Topic Watch Topic
  • New Topic