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 8092971
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T20:24:04+00:00 2026-06-05T20:24:04+00:00

We have a page where a client wants the modal to be visible on

  • 0

We have a page where a client wants the modal to be visible on page view. I’ve run into the problem where the bootstrap modal doesnt close unless you launch it manually

Am I doing something wrong? If you click launch modal (even tho the modal is already visible) you can then close it

Here’s the HTML:

<a class="btn" data-toggle="modal" href="#myModal">Launch Modal</a>

<div class="modal" id="myModal">
  <div class="modal-header">
    <button class="close" data-dismiss="modal" data-target="#myModal">&times;</button>
    <h3>Modal header</h3>
  </div>
  <div class="modal-body">
    <p>One fine body…</p>
  </div>
  <div class="modal-footer">
    <a href="#" class="btn" data-dismiss="modal" data-target="#myModal">Close</a>
    <a href="#" class="btn btn-primary">Save changes</a>
  </div>
</div>​

The CSS is just the Bootstap stuff. We’re not using any JavaScript code for this at all.

Live copy on jsFiddle

  • 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-05T20:24:06+00:00Added an answer on June 5, 2026 at 8:24 pm

    You’re not “launching” the modal, you just have inline markup that’s visible. The modal hasn’t really been opened at all.

    Make the modal hidden (add style="display: none" to the #myModal div) and then trigger opening it using .modal('show') from ready:

    jQuery(function($) {
        $('#myModal').modal('show');​​
    });
    

    Updated fiddle

    That will hook up the required handlers for the close button, position it properly, do the background overlay, etc.

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

Sidebar

Related Questions

I have a client who wants to offer options on the first page of
I have an HttpHandler that is run on a client page (cross domain, not
I have a client who wants a page to have their terms of service
I have a page with a YouTube video on it. The client wants the
I have a member management page where the client wants a field to be
I have a page with an image. I want the client to be able
I have a client page where I have I the following that shows up
I have a page in one of my client's websites that generates an extensive
I have one Page which is displaying details of some Client. I am using
My client is determined to have a page at /nfm&t so I made a

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.