Yii Framework Forum: Indeterminate check state - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Indeterminate check state checkbox state: Checked, Unchecked, Indeterminate Rate Topic: -----

#1 User is offline   Maro 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 26
  • Joined: 19-January 10

Posted 23 June 2010 - 04:44 AM

hello,
I'm trying to give the checkbox an indeterminate value instead of checked or unchecked .
so I tried:
document.getElementById("checkboxId").indeterminate = true;
it works fine on i.e. 7 and 8 but doesn't work in firefox :S

Any idea?
-2

#2 User is offline   Mike 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 3,013
  • Joined: 06-October 08
  • Location:Upper Palatinate

Posted 23 June 2010 - 05:12 AM

In my understanding a checkbox has exactly 2 states: checked or unchecked. Can't see how a "intermediate" state should work. Half checked?

Maybe what you want is to save data with a DOM element. You could use jQuery.data() for that.
0

#3 User is offline   Raoul 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 637
  • Joined: 29-November 08
  • Location:Paris, France

Posted 23 June 2010 - 04:02 PM

the only 'third' state I can think of is 'disabled' ... but that's probably not what IE7 & 8 do is it ?
ciao
8)
0

#4 User is offline   Maro 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 26
  • Joined: 19-January 10

Posted 26 June 2010 - 09:54 AM

no their is a third state: tristate or indeterminate i use it to make clear that the checked data is used for other sub checkbox you can see it in i.e if you use document.getElementById(checkboxid).indeterminate = true;

well my probleme is in firefox doesn't appear :S

any help
0

#5 User is offline   Y!! 

  • Advanced Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 978
  • Joined: 18-June 09

Posted 26 June 2010 - 10:22 AM

View PostMaro, on 23 June 2010 - 04:44 AM, said:

document.getElementById("checkboxId").indeterminate = true


Does work for me in Firefox (version 3.6.4) and in IE, but not in Safari, Opera or Chrome. Is this even a standard? I have the feeling Microsoft invented this for the browsers. :lol:
0

#6 User is offline   Mike 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 3,013
  • Joined: 06-October 08
  • Location:Upper Palatinate

Posted 27 June 2010 - 04:45 AM

Aha, interesting:
http://www.w3.org/TR.../#indeterminate
http://jeffhowden.co...kbox_check_all/
1

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users