Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

257
Views
Bootstrap Modal refresh in Javascript

I am working on project, from datatable i have button, when user clicks on it, it will open popup and shows pdf, (which i am rendering). Once user closed modal, next time if he opens button, it will show previous data. its not refreshing.

I have tried $(this).removeData('bs.modal'); it doesn't worked for me.

Here is my Modal code. Any idea how we can refresh only modal?

<div id="myModal" class="modal fade" role="dialog">
<div class="modal-dialog modal-xl">
    Modal content
    <div class="modal-content">
        <div class="modal-header">
            Preview
            <button type="button" class="close" data-bs-dismiss="modal">&times;</button>
        </div>
        <div class="modal-body">
            <div id="my_pdf_viewer">
                <div id="navigation_controls" style="text-align:center">
                    <button class="btn btn-primary" id="go_previous">Previous</button>
                    <input id="current_page" value="1" min="1" max="5" type="number" />
                    <button class="btn btn-primary" id="go_next">Next</button>
                </div>
                <br />
                <div id="zoom_controls" style="text-align:center">
                    <button class="btn btn-primary" id="zoom_in">Zoom In (+)</button>
                    <button class="btn btn-primary" id="zoom_out">Zoom Out (-)</button>
                </div>
                <div id="canvas_container">
                    <canvas id="pdf_renderer"></canvas>
                </div>
            </div>
            <div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" data-bs-dismiss="modal">Close</button>
            </div>
        </div>
    </div>
</div>
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!