• 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
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Changing CheckBox Default Checking Mechanism

 
Ranch Hand
Posts: 426
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

Good Day..

I have used multibox in my JSP in rendering user choices from a list of probable answer, but since multibox is rendered as an HTML Checkbox, the default checking mechanism is mark as check (since it is a checkbox, silly??? )

But what if my user wants it to marked as 'X' instead of a 'checked' mark when they click the checkbox? (user??..

)

I am not sure if Struts could handle this in the server side or should HTML/Javascript do the work. Please help me forward in the right forum if I might be wrong in posting

Though I want it to be mark 'X', the implementation with struts html tags should be the same.. Thanks.
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The rendering of a checkbox is up to the browser and there isn't a whole lot you can do to change it. I believe some browsers actually do render an "x" in a checkbox as the default.

However, I've had clients who wanted to change it also, so I did a little research. Below is a link that I found that presents a good solution to the problem:

http://brainerror.net/scripts/javascript/checkbox/
 
Mark Reyes
Ranch Hand
Posts: 426
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Merill,

Good Link.. That solves my problem..

Thanks you as always...
 
You showed up just in time for the waffles! And this 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