function generateRecaptcha() { //Recaptcha.create( "6Lcanc0SAAAAAC5v3FQJVrswwhK064a9P0rfjOu9", "div_recaptcha", { lang: "en", theme: "clean" } ); generateRecaptcha_v2(); } function generateRecaptcha_v2() { document.getElementById( 'div_recaptcha' ).innerHTML = ''; grecaptcha.render('div_recaptcha', { 'sitekey' : '6Lcanc0SAAAAAC5v3FQJVrswwhK064a9P0rfjOu9' }); }