Barbara
Posts: 0
Joined: Mon Sep 17, 2012 8:42 am

Dynamically added checkboxes

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?

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Dynamically added checkboxes

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

Barbara
Posts: 0
Joined: Mon Sep 17, 2012 8:42 am

Dynamically added checkboxes

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.

Barbara
Posts: 0
Joined: Mon Sep 17, 2012 8:42 am

Dynamically added checkboxes

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.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Dynamically added checkboxes

Thank you! We'll test.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Dynamically added checkboxes

Where we can find this code?

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Dynamically added checkboxes

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

Barbara
Posts: 0
Joined: Mon Sep 17, 2012 8:42 am

Dynamically added checkboxes

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

Barbara
Posts: 0
Joined: Mon Sep 17, 2012 8:42 am

Dynamically added checkboxes

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

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

Return to “Issues”