View Single Post
  #1  
Old 08 Mar 2011, 20:33
abdicar abdicar is offline
 
Join Date: Oct 2006
Reload Captcha in custom JavaScript.

Hello there,

We are doing in a custom page an integration with the vBulletin captcha, and we are almost done, but in special circunstances when we get an error from a progress we need to reload the captcha with ajax in the same form.

At this time, all the progress of captcha are made my the file vbulletin_ajax_imagereg.js, but it works with YUI, and to be honest I never use it before and I spend few hours and still I didnt get a easy way to reload the captcha calling a funcition in one line without press the default reload captcha link.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

If we use a simple <a href="">, what we can call from inline to reload the captcha?

Thank you in advanced for any help.

--------------- Added 08 Mar 2011 at 21:21 ---------------

Update:

Well, I tried this and works fine in FF and Chrome, but IE (as always sucks) return an error.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Error in IE:


Mensaje: El objeto no acepta esta propiedad o método
In english something like: Error: Object doesn't support this action

If anyone can suggest me something better will be very nice.

--------------- Added 08 Mar 2011 at 22:01 ---------------

Update:

Ok, I get solved with this:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

And you can call it in your JS as easy as: robotClick(document.getElementById('refresh_imagereg'));

I somebody have a better solution ( I'm pretty sure that It could exist please reply

Last edited by abdicar; 08 Mar 2011 at 22:01. Reason: Auto-Merged DoublePost
Reply With Quote