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