Page 1 of 1

Can't get checkbox id when using event on click run javascript alert(this.id);

Posted: Fri Sep 11, 2015 6:23 pm
by sebastian

So when I use alert(this.id); the checkbox is the only component I can't get an id from I just get a blank value.


Can't get checkbox id when using event on click run javascript alert(this.id);

Posted: Fri Sep 11, 2015 6:43 pm
by Serhii Kulibaba

Hello Sebastian,

Please use: prealert($(this).find("input").attr("id"));/pre instead of prealert(this.id);/pre


Can't get checkbox id when using event on click run javascript alert(this.id);

Posted: Tue Sep 15, 2015 7:02 pm
by sebastian

It worked thanks!