File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes Changing the default behaviour for check box ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Meteor in Action this week in the JavaScript forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Changing the default behaviour for check box ?" Watch "Changing the default behaviour for check box ?" New topic
Author

Changing the default behaviour for check box ?

Amandeep Singh
Ranch Hand

Joined: Jul 17, 2008
Posts: 850
My code is like this-


the checkbox get it's value from datasrc.

Initially the checkbox is unchecked when the datasrc has value null.

But once i check the box, the value changes to Y. Or if i uncheck the box, the value changes to N.

Question- Even when the datasrc has value null, i want to check the box, so how can i accomplish this ?

My requirement- even when the database has Y or null value, the checkbox should be checked.

Please advise.



SCJP 1.4, SCWCD 5, SCBCD 5, OCPJWSD 5,SCEA-1, Started Assignment Part 2
My blog- http://rkydesigns.blogspot.com
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 62464
    
  68

Have you looked at the attributes of the input tag to see if there's something appropriate?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15385
    
    6
http://www.w3schools.com/HTMLDOM/dom_obj_checkbox.asp

Eric
Amandeep Singh
Ranch Hand

Joined: Jul 17, 2008
Posts: 850
Actually after putting the post, I immediately opened the w3 school page. Then you also mentioned that page. Thanks for your quick reply. Soon i will let you know, how i solved my problem.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Changing the default behaviour for check box ?