Page 1 of 1

check box text

Posted: Tue Jul 30, 2013 2:06 pm
by Emmz

panel has this html
code
<div data-role="fieldcontain" class="2ndCodeGrp" id="Secondary" data-mini="true">
<fieldset data-role="controlgroup" data-type='horizontal' style="text-align: center">
<div style="width: 260px; margin: 0 auto;">
<input type="checkbox" name="2ndCodeGrp" id="this1" data="Section removal" style='display:none' data-mini="true" value="this1"&#47;><label for="this1">this1<&#47;label>
/code

Button shows normal but the generated html in browser shows

span class="ui-btn-text"
this1
/span

Note the huge white space.

I had code to read, adjust label, increment counter on label etc.
No longer works since Appery last update.

code
$("input[type='checkbox']:checked")&#46;each(function () {
var response = $('label[for="' + this&#46;id + '"]')&#46;text();
console&#46;log("response " + response);

if (response&#46;length > 5) {
etc&#46;&#46;}
/code
Why does the var response have whitespace at the end of the text from my example code above.
instead of response = "this1"
I get "this1 "

I can strip last char. but if you change Appery again later this will be a problem

Suggestions?
Thanks.


check box text

Posted: Tue Jul 30, 2013 3:43 pm
by Kateryna Grynko

Hi Neil,

Could you please give us a public link to your app?


check box text

Posted: Tue Jul 30, 2013 3:55 pm
by Emmz

Cant. Wont run unless registered.

I used
$.trim(response);//trim white space front and back

To fix.