Hi, I want to load a table's data when the Show Program button is pressed. 
This is what I do and does not work. 

-- default.py
def index():
    return dict( list_program = SQLFORM.grid(db.Program) )  # Program is a 
SQL table in my database


-- index.html
<script>
jQuery(document).ready(function(){
   jQuery('#btn_show_program').click(function(){   jQuery('#selected_form').
html( '*{{=list_program}}*' ) });
});
</script>

<div class="container-fluid">
    <div class="row">
        <div class="col col-md-2">
            <div class="btn-group-vertical justify-content-between" role=
"group">
                <button id="btn_show_program"   type="button" class="btn 
btn-outline-primary">Show Program</button>
            </div>
        </div>
        <div class="col" id="form_wrapper">
            <div id="selected_form"></div>
        </div>
    </div>
</div>

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to