Page 1 of 1

Dynamically added checkboxes

Posted: Thu Oct 11, 2012 5:23 am
by Barbara

I am adding checkboxes with custom js and I'm getting the following error

uncaught exception: cannot call methods on checkboxradio prior to initialization; attempted to call method 'refresh'

I am not calling 'refresh' is this somewhere in your code?


Dynamically added checkboxes

Posted: Thu Oct 11, 2012 9:40 am
by Maryna Brodina

Hello! Where did you get this error? How to reproduce it?


Dynamically added checkboxes

Posted: Thu Oct 11, 2012 10:06 am
by Barbara

Hello to you too :)

Sorry for being such a nuisance.

To reproduce

log in with user barb pass g00dl1fe (the 0's are zeros)
Access menu and select "shopping lists"
select "saved shopping lists"
Then select list1 from bottom of menu when it shows up.


Dynamically added checkboxes

Posted: Thu Oct 11, 2012 10:17 am
by Barbara

Hello to you too :)

Sorry for being such a nuisance.

To reproduce

log in with user barb pass g00dl1fe (the 0's are zeros, sorry tricky password)
Access menu and select "shopping lists"
select "saved shopping lists"
Then select list1 from bottom of menu when it shows up.


Dynamically added checkboxes

Posted: Thu Oct 11, 2012 10:22 am
by Maryna Brodina

Thank you! We'll test.


Dynamically added checkboxes

Posted: Thu Oct 11, 2012 11:17 am
by Maryna Brodina

Where we can find this code?


Dynamically added checkboxes

Posted: Thu Oct 11, 2012 3:47 pm
by Maryna Brodina

it's probably done by jQuery.. when you add components you need to call refresh.


Dynamically added checkboxes

Posted: Thu Oct 11, 2012 10:38 pm
by Barbara

The code is in the success event for the getlist service.


Dynamically added checkboxes

Posted: Thu Oct 11, 2012 10:48 pm
by Barbara

Don't worry - I got rid of the error using

$("[name='list']").trigger('create');