aspose 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
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: 844
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: 61434
    
  67

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: 15376
    
    6
http://www.w3schools.com/HTMLDOM/dom_obj_checkbox.asp

Eric
Amandeep Singh
Ranch Hand

Joined: Jul 17, 2008
Posts: 844
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.
 
Consider Paul's rocket mass heater.
 
subject: Changing the default behaviour for check box ?