Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

default behavior of a checkbox to be checked

 
Michele Smith
Ranch Hand
Posts: 421
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


No matter what I do, this page loads unchecked.

Any ideas?

thanks,
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65225
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Something else must be at play here. Perhaps some script that strips the checked attribute?

By the way, using checked="true" is a really bad idea. It leads one to believe that checked="false" will uncheck the box, but it won't. Both checked="true" and checked="false" do the exact same thing: make the checkbox checked. In fact, any value assigned to checked will make the checkbox checked; for example checked="jfdhgfdhgkfdhg".

If you are using HTML4 or HTML5, it should just be checked. If you are using XHTML (archaic), it should be checked="checked". (HTML5 will actually allow either form, but really, why use XML notation for something that's not XML?)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic