hi,
is ajax function is bond by cache.ram? does anyone knows about it?
e.g.
controller:
def __show_2(table, index_link, add_link, search_link, edit_link,
table_2, field):
page = table(request.args(0)) or redirect(URL(request.application,
request.controller, index_link))
field.default = page.id
form = crud.create(table_2, message = T('Record Inserted'), next =
URL(request.application, request.controller, request.function, args =
page.id))
results = db(field == page.id).select(orderby = ~table_2.id, cache
= (cache.ram, 10))
return dict(page = page, results = results, form = form)
views:
{{extend 'layout.html'}}
<script>
jQuery(document).ready(function(){
jQuery('.view').click(function()
{jQuery('.comments').slideToggle()});
jQuery('.post').click(function(){jQuery('.form').slideToggle()});
jQuery('.post').submit(function(){ajax('{{=request.controller}}',
[], 'comments hidden')});
});
</script>
{{=H1(page.title)}}
{{=BR()}}
{{=page.content}}
{{=BR()}}
{{=db.blog_category[page.category_id].category}}
{{=BR()}}
{{if len(results):}}
{{=DIV(A(T('View Comments (%s)' % len(results)), _href = '#'),
_class = 'view')}}
<div class = "comments hidden">
{{for blog_comment in results:}}
{{=P(db.auth_user[blog_comment.created_by].first_name, T(' on
'), blog_comment.created_on, T(' Said '), blog_comment.comment)}}
{{pass}}
</div>
{{else:}}
{{=DIV(B(T('No Comments Posted Yet')))}}
{{pass}}
{{=DIV(A(T('Post a Comment'), _href = '#'), _class = 'post')}}
{{=DIV(form, _class = 'form hidden')}}
my problem is the value that inserted from the form is not shown after
it inserted, it take more time, but when i checked on database the
value have already inputed. does anyone have a solution for this
problem