How to check element using link

7 views
Skip to first unread message

mediavrog

unread,
Nov 21, 2010, 12:26:43 PM11/21/10
to Custom Form Elements
2009-10-17 21:14:52 CEST by https://sourceforge.net/users/sport4535/

The examples only show how to 'check all' elements. How can I use a
link to check a single checkbox element.

mediavrog

unread,
Nov 21, 2010, 12:27:25 PM11/21/10
to Custom Form Elements
One way to do so, is to set the property checked to true (="checked")
and fire a change event:

var el = $("idOfCheckbox");

el.checked = true;
el.fireEvent("change");

another way could be to retrieve the instance of cfe from the original
checkbox and call the check method

$("idOfCheckbox").retrieve("cfe").check()

Think of Custom Form Elements as a decolayer on top of the standard
functionality of form elements, you may use the standard DOM methods
or cfe methods either way

On 21 Nov., 18:26, mediavrog <maik...@web.de> wrote:
> 2009-10-17 21:14:52 CEST byhttps://sourceforge.net/users/sport4535/
Reply all
Reply to author
Forward
0 new messages