Using jqm SetValue with CheckBox


#1

If I try to run this code in a browser

If strChecked = "Checked" Then chkRememberMe.setValue(1, True)

I get an error [Uncaught TypeError: chkRememberMe.setValue is not a function].

Have I misinterpreted [setValue(n, val)] incorrectly?

My checkbox is jqm with id chkRememberMe and is a single checkbox.


#2

Yes, this should work fine.

Is there any chance you are doing this right at startup? If so, the control may not be full formed yet.


#3

Thank you - that appears to have been the problem. Moved it to Sub Main() and all is good.