Hello I've done small modification to web2py_ajax.html (to function web2py_trap_form precisely) to support not only forms but A links also.
#function web2py_trap_form(action,target) { # jQuery('#'+target+' form').each(function(i){ # var form=jQuery(this); # jQuery(':submit,.submit',this).click(function(){ # jQuery('.flash').hide().html(''); # web2py_ajax_page('post',action,form.serialize(),target); # return false; # }); # }); jQuery('#'+target+' a').each(function(i){ $(this).click(function(){ jQuery('.flash').hide().html(''); web2py_ajax_page('get',$(this).attr('href'),null,target); return false; }); }); #} This work as magic. Not sure how. Can't say should i leave " jQuery ('.flash').hide().html('');" or remove it. Please criticize.
-- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.