Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 586509
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T15:06:52+00:00 2026-05-13T15:06:52+00:00

I have integrated Recaptcha with dJango. dJango Snippet – Recaptcha The view which is

  • 0

I have integrated Recaptcha with dJango.
dJango Snippet – Recaptcha

The view which is showing the page is –
from baseapp.recaptcha import captcha

def showHome(request):    
    if(request.user.is_authenticated()):    
        tempEmail = request.session.get('id')    
        return render_to_response('logreg/login-register.html',   {'emailFromForm':tempEmail}, context_instance=RequestContext(request));    
    else:    
        request.session.set_test_cookie()    
        form = RegistrationForm()    
        loginForm = LoginForm()    
        html_captcha = captcha.displayhtml(settings.RECAPTCHA_PUB_KEY)    
        print "Captcha HTML is : %s" % html_captcha    
        return render_to_response('logreg/login-register.html', {'form': form, 'loginForm':loginForm, 'html_captcha':html_captcha})    `

Here is the code in html –

<div id="register-dialog" title="Register yourself">    
  <p id="validateTips">All form fields are required.</p>    
  {% if error %}    
  {{ error }}    
  {% endif %}    
  <form name="registrationForm" action="registerUser/" method="post">    
      {{ form.as_p }}    
      {{ html_captcha }}    
  </form>    
</div>

It works great in IE & Chrome, but firefox shows me an exception at line 451 in recaptcha.
Here is the code at that line var $ST = RecaptchaState;

Any thoughts are appreciated !

Note : Firefox version – 3.6; IE – 8; Chrome – 4.0

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T15:06:52+00:00Added an answer on May 13, 2026 at 3:06 pm

    Here is how I solved it.

    I figured that my captcha is being shown inside the jqueryui dialog and maybe that is the problem with FF. (Why ? I don’t know.)
    Hence instead of statically putting the text there from django or writing it out.
    I used the ajax api and inserted the recaptcha on the open event on the dialog.

    Here is the sample code, just in case someone stumbles upon the same issue.

    Code is almost similar to what is on the reCaptcha api site

    $("#register-dialog").dialog({    
        buttons:{
        },    
        open: function() {
        Recaptcha.create("41x39....",
            "recaptcha_div", {
            theme: "red",
            callback: Recaptcha.focus_response_field
            });
    

    And changed the form tag to be so –

    <form name="registrationForm" action="registerUser/" method="post">    
        {{ form.as_p }}    
        <div id="recaptcha_div"></div>    
    </form>
    

    And yes, included the ajax.js –

        <script type="text/javascript" src="http://api.recaptcha.net/js/recaptcha_ajax.js">
        </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 282k
  • Answers 282k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer @implementation TestClass - (void) dealloc { // If you don't… May 13, 2026 at 4:05 pm
  • Editorial Team
    Editorial Team added an answer the :hover is not accepted on all elements by all… May 13, 2026 at 4:05 pm
  • Editorial Team
    Editorial Team added an answer Although I have only used Netbeans and XDebug for remote… May 13, 2026 at 4:05 pm

Related Questions

I have integrated Cargo plugin in my maven 2 project POM.xml. During hot deployment
I have integrated Google mobile analytics into my iphone app, but for some reason
I have integrated FlexPMD into my pom.xml file but I need to change the
In my iphone application i have integrated Google Map.I want to show the country
I have installed in my Desktop Computer Visua Studio 2008 Team System 2008 Architecture

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.