Sha256: 3c93e3ecf9f119d33f15bfd4220d9935d29f138392b2af79541501ad6ef2d0ff

Contents?: true

Size: 624 Bytes

Versions: 4

Compression:

Stored size: 624 Bytes

Contents

$(document).ready(function() {
  function rails_captcha_request() {
    var env = $('#captcha_image_container').attr('class');
    $.ajax({
      type: "GET",
      url: '/captcha/captcha.js',
      dataType: "html",
      success: function(data){
        $('#captcha_image_container').html('<img id="captcha_image" src="'+'/images/captchas/'+env+'/'+data+'.jpg'+'" alt="<%= t('rails_captcha.security_code') %>" />');
      },
      error: function(result) { alert('Captcha ERROR'); }
    });
  }
  rails_captcha_request();
  $("#update_captcha").click(function () {
    rails_captcha_request();
    return false;
  });
});

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rails_captcha-0.0.10 app/views/rails_captcha/captcha/load_captcha.js.erb
rails_captcha-0.0.8 app/views/rails_captcha/captcha/load_captcha.js.erb
rails_captcha-0.0.7 app/views/rails_captcha/captcha/load_captcha.js.erb
rails_captcha-0.0.6 app/views/rails_captcha/captcha/load_captcha.js.erb