user.js 654B

1234567891011121314151617181920212223242526272829
  1. /* */
  2. $(document).ready(function(){
  3. $('form#address_update input[type="submit"]').click(function(){
  4. $('form#address_update img.loader').show();
  5. });
  6. $('form#address_update').ajaxForm(function(response){
  7. $('form#address_update img.loader').hide();
  8. form = $('form#address_update');
  9. form.find('ul.error_list').remove();
  10. if (response.status == 'error')
  11. {
  12. ul_errors = $('<ul>').addClass('error_list');
  13. for (i in response.errors)
  14. {
  15. ul_errors.append($('<li>').append(response.errors[i]));
  16. }
  17. form.prepend(ul_errors);
  18. }
  19. });
  20. });