Tweet, Share & Like [ EnAcCiOn ]

 

FeedBurner FeedCount Y Facebook | EnAcCiOn

Send Voicemail | EnAcCiOn

Contact me using vCita | EnAcCiOn

Contact me using vCita | EnAcCiOn

Meeting Scheduler Powered by vCita

viernes, 24 de julio de 2015

Re: ReCaptcha difficulties in Ember.js component

I got this to work by loading the script with getScript and then waiting for the 'grecaptcha' object to become defined ( the initial script loads a second language-specific script.) GistOn Tuesday, 21 July 2015 12:26:49 UTC+2, Donal Byrne wrote: Could you give an example of how you installed the api.js with bower?On Wednesday, 11 March 2015 20:26:43 UTC+1, Ashraf Hasson wrote: Hi Brandon,I've done something similar to this, i.e., created a recaptcha component, however, I've not opted for a dynamic load of the api.js script, rather installed it with bower then on `didInsertElement` I just explicitly render the recaptcha, so there's no need for a callback, like so: export default Ember.Component.extend({    classNames: ['g-recaptcha''],    attributeBindings: ['data-sitekey'],    'data-sitekey': '...',    didInsertElement: function () {        var self = this;        grecaptcha.render(self.$().prop('id'), {            'sitekey': self.get('data-sitekey')        });    }}); reCaptcha, however, does add an invisible div at the bottom of 'body' which in RTL mode messes up the layout, wonder if you have a cure for that?Thanks,On Thursday, January 22, 2015 at 3:40:02 PM UTC-5, Brandon Barrett wrote: The widget works on its own if I use $.getScript('//www.google.com/recaptcha/api.js') after inserting 
I cannot get the callback to fire for success:
and when I go the explicit rendering route I can't get the onload callback to fire: $.getScript('//www.google.com/recaptcha/api.js?render=explicit&onload=myNameSpace.onloadCallback') There are no console errors, and the callbacks don't fire at all.  The callbacks are on the global namespace (not buried in Ember).  For those who know ember, the
is in a component template, the $.getScript is fired in the didInsertElement hook (after div is inserted), and the callback is on the global namespace. I don't understand why this isn't working and I'm running out of debug paths to travel down.  Any insights would be greatly appreciated! -- You received this message because you are subscribed to the Google Groups "reCAPTCHA" group. To unsubscribe from this group and stop receiving emails from it, send an email to recaptcha+unsubscribe@googlegroups.com. To post to this group, send email to recaptcha@googlegroups.com. Visit this group at http://bit.ly/1dkFnYd. For more options, visit http://bit.ly/P65DvS.

No hay comentarios:

EnAcCiOn

Contador Web | EnAcCiOn

EnAcCiOn

EnAcCiOn

EnAcCiOn

Blog Archive | EnAcCiOn