Hello,
I have a farely large menu structure in a page through buttons with dropdown menu's which are changed dynamically. A refresh of the whole page take about 5 seconds which is too long. Now I want to split this using components. These components must be reloaded depending on additions to the database through a SQLFORM.factory.
navigation.load:
<div id='menu_identity'>
</div>
{{=LOAD('default', 'menu_identity.load', ajax=False, ajax_trap=False, vars=request.vars, target='menu_identity') }}
menu_identity.load:
<li>{{=A(T("Add local EV"),_href=URL('internal','add_local_ev.load',
vars=dict(com=com, sif=sif)), cid='internal_data_div' ) }}</li>
add_local_ev.load:
{{=LOAD('internal', 'process_add_local_ev', ajax=True, ajax_trap=True, vars=request.vars )}}
internal.py:
if form_add_local_ev.process(formname='add_lev').accepted:
.....
response.js = "jQuery('#%s').get(0).reload()" % 'menu_identity'
I think I am making the design to complicated and does not give the needed functionality.
Any assist is welcome.
Richard D