IExplorer Operation Aborted Fix

34 views
Skip to first unread message

KnightOfShaddai

unread,
May 19, 2008, 12:55:23 PM5/19/08
to reCAPTCHA
Heh, sorry about the e-mail reCaptcha admin^^() Still new to Google
Groups.

I had a similar problem that Alex King had. The recaptcha was loading
in Firefox just fine, but not in Internet Explorer. After commenting
out portions of the markup, I found the problem was this line in the
recaptcha.php file:

<script type="text/javascript" src="'. $server . '/challenge?k=' .
$pubkey . $errorpart . '"></script>

I assumed there was probably a conflict between the javascripts that
my site was running and javascripts that reCaptcha was trying to load
from its own site. Even after I switched to AJAX, upon this thread's
suggestion, it didn't seem to work all the time. Sometimes it would
begin to load it and then the page would fail in Internet Explorer.
Thats when I realized that if I could somehow force the creation of
the recaptcha after the entire page was loaded, it would fix the
problem. So I set the javascript code that called the
Recaptcha.create() function into its own function called
display_Recaptcha() and then used setTimeout() to call that function
after five seconds. Sure enough, it worked!

I'd put a link to it here, but unfortunately the recaptcha was
implemented for a rating system in the Member-Only section of my
employer's website. Sorry :( The code will look similar to this:

<script>
function display_Recaptcha( myObject ) {
Recaptcha.create( "Your public key", myObject, { theme: "red",
tabindex: 0, callback: Recaptcha.focus_response_field });
}
</script>

<div id='myObject'></div>

<script>setTimeout( "display_Recaptcha( 'myObject' )", 5000 );</
script>

I've tested it on Firefox and Internet Explorer 7 and it works fine.
Haven't tired it on IE 6 yet, but I'm confident that it'll probably
work there too. The only trouble I can see this fix having is if the
user's computer is slow or has a slow internet connection. In that
case, you'd want to increase the delay of the setTimeout() function.

Hope this is helpful :)

iquito

unread,
May 24, 2008, 5:13:31 PM5/24/08
to reCAPTCHA
Great tip, I managed to solve my problem described in
http://groups.google.com/group/recaptcha/browse_thread/thread/8dc383428edad9ba
with these "instructions" and with some explanations in
http://groups.google.com/group/recaptcha/browse_thread/thread/0f24dff9c30d597c
- at least it seems to work now, let's see if it stays that way.

A suggestion to including Recaptcha.create after page loading -
instead of a timeout it would probably be better to include it in body-
onload or in my case with Prototype the statement
"document.observe("dom:loaded", function()
{ Recaptcha.create(...); });" is perfect, it loads Recaptcha right
after the DOM has been loaded so page and reCAPTCHA creation even
feels faster than doing it the non-AJAX way.

I think in my case reCAPTCHA conflicted with Prototype, because the
problem disappeared as soon as I did not include either Prototype or
reCAPTCHA - I think there should be a Prototype-compatible out-of-the-
box-version of reCAPTCHA and/or some kind of information about this
possible problem in the documentation, because it's hard to actually
notice the problem and find any solution for it - it took me 2 weeks
to just notice the problem and another 2 weeks until I found this
thread and the other one which at least discuss the problem - that's
quite a bad "user" experience for me, and I'm still weary if it
actually works now. It seems this problem can be caused by different
JS libraries, so a warning would be good as long as no fix is
available.

Is there any kind of official fix coming in the near future?
Reply all
Reply to author
Forward
0 new messages