*views/form.html*
<select id = "table_id" name = "table_id" title = "Table ID" onchange = 
"ajax('{{=URL(request.controller, target) }}', {{=field_list}}, 'target')" 
*onselect 
= "jQuery('#month').val()" *class = "form-control">
{{for row in rows:}}
<optgroup label = "{{=row.pitch_class}} Tones">
{{
for r in db(table.pitch_class == row.pitch_class).select(cache = cache_db, 
cacheable = True):
}}
<option value = {{=r.id}} {{='selected' if r.id == 22 else ''}}>
{{=", ".join([row_name for row_name in r.name] ) }}
</option>
{{pass}}
</optgroup>
{{pass}}
</select>

*{{selected_table_id = jQuery('#table_id').val() }}*
{{for i in range(1, *selected_table_id* + 1, 1):}}
<input name = "active_string" type = "checkbox" id = {{=i}} value = {{=i}}>
<label for = {{=i}}>{{=i}}</label>
{{pass}}

how to get the value of selected table_id then pass it into 
selected_table_id variable that can be used for input type checkbox in 
web2py way ?

thanks and best regards,
stifan

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/11f0a784-4bb9-41fe-af00-513976a96089n%40googlegroups.com.

Reply via email to