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

  • SEARCH
  • Home
  • 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 8413269
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T00:53:07+00:00 2026-06-10T00:53:07+00:00

I am getting this JavaScript error in Chrome: RangeError: Maximum call stack size exceeded

  • 0

I am getting this JavaScript error in Chrome:

RangeError: Maximum call stack size exceeded
[http://localhost:5545/assets/js/jquery.min.js:2]

With this click event:

$('.accept-answer-button').click(function() {
    var id = $(this).parent().parent().attr('id').replace('answer_', ''),
        b = this;
    if ($('.accepted').length > 0) $('.accepted').click();
    AP.AcceptAnswer(id, $(b));
});​

The code for AP.AcceptAnswer() is:

AP.AcceptAnswer = function(a, o) {
    $.getJSON('/assets/ajax/accept-answer', {
        qid: qid,
        answer: a
    }, function(data) {
        if (data.success == true) {
            if (data.type == 'accepted') {
                var title = o.attr('data-unaccept-title').replace('{t}', data.time);
                o.addClass('accepted').attr('title', title);
            }
            else if (data.type == 'unaccepted') {
                var title = o.attr('data-accept-title').replace('{t}', data.time);
                o.removeClass('accepted').attr('title', title);
            }
        }
        else {
            alert(data.error);
        }
    });
}; // end AP.AcceptAnswer()​

I am doing $('.accepted').click(); just to unaccept the currently accepted answer (if there is one) when the user would like to accept another answer.

  • 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-06-10T00:53:09+00:00Added an answer on June 10, 2026 at 12:53 am

    Are you sure that the classes .accepted and .accept-answer-button aren’t pointing to the same element? If they are you are recursively firing a click event when you do this:

    $('.accepted').click(); 
    

    If $('.accepted').length > 0 is always true.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm getting this JavaScript error XMLHttpRequest cannot load http://foo.bar.no/API/map_tools/clean_addresses/check . Origin http://foo.bar.no:9294 is not
I'm getting a javascript error. It has to do with this section of code:
I am getting this error in chrome XMLHttpRequest cannot load ttp://www.officeyoganyc.com/lists/?p=subscribe. Cross origin requests
I am getting this error only in chrome for superfish drop down menu. It
On Chrome I'm getting an error Refused to execute a JavaScript script. Source code
I'm trying to run a javascript file in Gitbash but getting this error. $
I am getting a javascript (prototype.js) error: Unexpected token ILLEGAL at this line of
Getting that error in my javascript console(in Chrome) with a collada object I'm attempting
I am defining this function in JavaScript and I am getting an error like
I am getting some client-side Javascript stack overflow issues specifically in IE browser, this

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.