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 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

StackOverflow Point

StackOverflow Point Navigation

  • Web Stories
  • Badges
  • Tags
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Web Stories
  • Badges
  • Tags
Home/ Questions/Q 1630
Alex Hales
  • 0
Alex HalesTeacher
Asked: May 30, 20222022-05-30T22:01:54+00:00 2022-05-30T22:01:54+00:00

javascript – “Maximum call stack size exceeded” error on fetch

  • 0

[ad_1]

My HTML has two buttons to open different modal windows:

<div class="modal fade" id="workflow_modal" tabindex="-1" role="dialog" aria-labelledby="notFoundModalLabel">
    <div style="max-width:950px" class="modal-dialog modal-lg" id="wchild" role="dialog">
        <div class="modal-content">
            <div id="workflow_modal_content" >
            <!-- dynamically generated for this comment -->
            </div>
        </div>
</div>
<div class="modal fade" id="mappingexception_modal" tabindex="-1" role="dialog" aria-labelledby="notFoundModalLabel">
    <div style="max-width:950px" class="modal-dialog modal-lg" id="zchild" role="dialog">
        <div class="modal-content">
            <div id="mappingexception_modal_content" >
            <!-- dynamically generated for this comment -->
            </div>
        </div>
    </div>
</div>

<div id="team_view" class="btn-group col-10" role="group">
     <label id="team_manage_label"
           class="histbtn btn btn-outline-secondary btn-sm">Open</label> &nbsp;&nbsp;&nbsp;
     <label id="mapping_exception_label"
           class="histbtn btn btn-outline-secondary btn-sm">Mapping Exception</label>
</div>

function show_teamnmanage_model(doc) {

$('#workflow_modal_content').html(doc);
$('#workflow_modal').modal({
 show:true,
 backdrop:'static'
 });
}

function show_mappingexception_model(doc) {

$('#mappingexception_modal_content').html(doc);
$('#mappingexception_modal').modal({
 show:true,
 backdrop:'static'
 });
}

$('#team_manage_label').on('click', function() {
let data = new FormData();
team = "{{ team }}";
all_users = "{{ overrun_users}}";
data.append('team', team);
data.append('overrun_users', all_users);
let uid = $('#test-user-select').val().toString();
let url = `api/team/manage/teammanage_modal.html?as_user=${uid}`
fetch(encodeURI(url))
    .then(html)
    .then(show_teamnmanage_model.bind(this))

});

$('#mapping_exception_label').on('click', function() {
let url = `api/team/manage/mapping_exception_modal.html`
fetch(encodeURI(url))
    .then(html)
    .then(show_mappingexception_model.bind(this))

});

The button ‘Open’ works fine.

The button ‘Mapping Exception’ works on first click. at second clik onwards, the modal does not show up and the console shows the the “Uncaught RangeError: Maximum call stack size exceeded” error:

enter image description here

Where did I get it wrong?

[ad_2]

  • 0 0 Answers
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report
Leave an answer

Leave an answer
Cancel reply

Browse

Sidebar

Ask A Question

Related Questions

  • xcode - Can you build dynamic libraries for iOS and ...

    • 0 Answers
  • bash - How to check if a process id (PID) ...

    • 4994 Answers
  • database - Oracle: Changing VARCHAR2 column to CLOB

    • 1084 Answers
  • What's the difference between HEAD, working tree and index, in ...

    • 1028 Answers
  • Amazon EC2 Free tier - how many instances can I ...

    • 0 Answers

Stats

  • Questions : 43k

Subscribe

Login

Forgot Password?

Footer

Follow

© 2022 Stackoverflow Point. All Rights Reserved.

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.