hi,

is it possible to make response flash disappear during ajax callback? 
i've tried before but the response flash still appear
*e.g.*
*controllers/default.py*
def subscription_callback():
if request.vars.action == 'adjust_total':
id = int(request.vars.id)
investor = int(request.vars.investor)
nav_date = request.vars.nav_date
nav_per_unit = float(request.vars.nav_per_unit)
fee = float(request.vars.fee)
amount = float(request.vars['amount_%s' % id] )
fee_amount = (amount * fee) / 100
unit = amount / nav_per_unit

row_account = db(db.account.id == id).iterselect(cache = cache_db, 
cacheable = True).first()
row_product = db(db.product.id == row_account.product).iterselect(cache = 
cache_db, 
 cacheable = True).first()
if amount < row_product.min_subscription:
response.flash = T("Amount Value must greater than %s %s")  % 
(row_product.currency.symbol, 
  locale.format("%.2f", 
  row_product.min_subscription, 
  grouping = True) )
else:
* #"jQuery('.w2p_flash alert alert-dismissable').prop(display, None)"*
* "jQuery('.w2p_flash alert alert-dismissable').css(display, None)"*
* #response.flash = ''*
* #response.flash = None*
session_subscription[id] = investor, amount, nav_date, nav_per_unit, fee, 
fee_amount, unit
return "jQuery('#fee_amount_%s').html('%s %s'); 
jQuery('#unit_%s').html('%s');" % (id, 
  row_account.product.currency.symbol, 
  locale.format("%.2f", fee_amount, grouping = True), id, 
  locale.format("%.4f", unit, grouping = True) )

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

Reply via email to