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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T16:18:08+00:00 2026-06-04T16:18:08+00:00

Having an annoying problem with simplemodal and multiple browsers. I’ve put together a sample

  • 0

Having an annoying problem with simplemodal and multiple browsers. I’ve put together a sample that illustrates the problem. When it is run in Firefox or Chrome, it works fine. It’s a simple link, that when clicked brings up a simple dialog. If you click the ‘Yes’ button, an alert pops up that says so, and if you click no, the dialog closes without doing anything. The problems occur when running in Internet Explorer. In version 9, the dialog appears below the page content and at the left side, when it should appear pretty much in the middle of the page. It also changes the cursor to wait, and then hangs. In version 8, the dialog appears in that same location, but the buttons are clickable, and the dialog functions – it’s just not in the right place. I’ve looked over all the css, and can’t spot what the problem might be. Any help would be appreciated. Here’s the page code and css:

HTML markup

<div id='container'>
    <div id='content'>
        <div id='confirm-dialog'>
        <h1>Dialog Test</h1>
        <a href="#" class='confirm'>Click Me for Dialog</a><br />
    </div>
    <div id='confirm'>
        <div class='header'><span>Dialog Window</span></div>
        <div class='message'>
            <p>This is a dialog.</p>
            <p>There are many like it, but this one is mine.</p>
            <p>Got it?</p>
        </div>
        <div class='buttons'>
            <div class='no simplemodal-close'>No</div>
            <div class='yes'>Yes</div>
        </div>
    </div>
</div>

JS markup:

jQuery(function ($) {
    $('#confirm-dialog input.confirm, #confirm-dialog a.confirm').click(function (e) {
        e.preventDefault();

        confirm("", function () {
            alert("You clicked YES");
        });
    });
});

function confirm(message, callback) {
    $('#confirm').modal({
        closeHTML: "<a href='#' title='Close' class='modal-close'>x</a>",
        position: ["20%",],
        overlayId: 'confirm-overlay',
        containerId: 'confirm-container', 
        containerCss: {
                            height: 250,
                            width: 400,
                            backgroundColor: '#fff',
                            border: '3px solid #ccc'
                      },

        onShow: function (dialog) {
            var modal = this;

            $('.message', dialog.data[0]).append(message);

            $('.yes', dialog.data[0]).click(function () {
                if ($.isFunction(callback)) {
                    callback.apply();
                }
                modal.close(); 
            });
        }
    });
}

CSS markup:

#confirm {display:none;}

/* Overlay */
#confirm-overlay {background-color:#eee; cursor:wait;}

/* Container */
#confirm-container {height:140px; width:420px; font: 16px/22px 'Trebuchet MS', Verdana, Arial; text-  align:left; background:#fff; border:2px solid #0F1F91;}
/* solid #336699; */
#confirm-container .header {height:30px; line-height:30px; width:100%;        background:url(../img/confirm/header.gif) repeat-x; color:#fff; font-weight:bold;}
#confirm-container .header span {padding-left:8px;}
#confirm-container .message {color:#333; font-size:14px; margin:0; padding:12px 4px 12px 8px;}
#confirm-container .buttons {line-height:26px; width:160px; float:right; padding:10px 8px 0;} 
#confirm-container .buttons div {float:right; margin-left:4px; height:26px; width:40px; color:#666; font-weight:bold; text-align:center; background:url(../img/confirm/button.gif) repeat-x; border:1px solid #bbb; cursor:pointer;} 
#confirm-container a.modal-close {margin-top:3px}
#confirm-container a.modal-close:link,
#confirm-container a.modal-close:active,
#confirm-container a.modal-close:visited {text-decoration:none; font-weight:bold; position:absolute; right:10px; top:2px; color:#fff;}
#confirm-container a.modal-close:hover {color:#ccc;}
  • 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-04T16:18:10+00:00Added an answer on June 4, 2026 at 4:18 pm

    Found the answer in another thread – despite searching before I posted, that thread didn’t show up on my initial search.

    The fix was to change the following:

    containerCss: {
      height: 250,
      width: 400,
      backgroundColor: '#fff',
      border: '3px solid #ccc',
    },
    

    To this:

    containerCss: {
      height: 250,
      width: 400,
      backgroundColor: '#fff',
      border: '3px solid #ccc',
      position: 'absolute', top: '0px'
    },
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've run into a very annoying problem that I'm having an impossible time solving.
I'm having an annoying problem, that may have a simple answer! I have a
I'm having a annoying problem with a C++ function that I wrote and whose
I am having an annoying problem that I cannot seem to fix. I have
I'm having this annoying problem that when I try to open localhost:8080 in IE9,
Im having rather an annoying problem. I have a class called Person and a
I am having this really annoying problem on a php-site I am programming and
We are having an annoying issue with Firefox and cookies. We have the following
I've been having this really annoying thing happen the past few days, that has
I'm having this annoying problem with Rails 3 (ruby 1.9.2) and nested resources. In

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.