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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:14:41+00:00 2026-05-27T06:14:41+00:00

I have an ASP.NET 3.5 web site project. In it there exists a page

  • 0

I have an ASP.NET 3.5 web site project. In it there exists a page (A); within this page there is an <iframe> that loads another page (B). From B, a modal dialog is launched through this function:

function ShowDialogLookup(anchorDiv) {
    // anchorDiv is div element with some data properties
    var result = window.showModalDialog($(anchorDiv).data('popup-url'), window, "dialogHeight: 300px; dialogWidth: 500px");
    return false;
}

Disclaimer: I wish a thousand times over I could rewrite this to use a jQuery Dialog in modal mode, but I’m only responsible for getting it to work in IE9. So with that said…

In this popup, the page that is displayed contains an “OK” and a “Cancel” button. The “Cancel” button is simply:

<button class="lookup-cancel">Cancel</button>

It is assigned an event to close the modal dialog:

$('.lookup-cancel').button().click(function() {
    window.close();
});

In IE9, non-compatibility-view mode, clicking the button causes two things to happen:

  1. The modal dialog closes, but
  2. A second, full-frame window is launched using the same URL as the modal dialog.

The “Cancel” button within the full window now works properly, when it’s no longer contained within a modal dialog window, but whatever prompted IE to launch it is unexpected behavior.

In IE9, with compatibility-view mode enabled, clicking the button does exactly what it’s supposed to.

  • Have I done something jQuery or IE-wise that breaks in IE9 that would have worked in IE 6, 7, or 8?
  • 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-05-27T06:14:42+00:00Added an answer on May 27, 2026 at 6:14 am

    I got lucky on this one. IE9 apparently cares about the type of the <button>. In this case, IE9 treats it as a submit button. The act of “submitting” was causing a separate page to load outside of the modal dialog.

    Changing the button to:

    <button type="button" class="lookup-cancel">Cancel</button>
    

    solved the issue.

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

Sidebar

Related Questions

I have an Asp.Net web site (there is no .csproj file). This web site's
Possible Duplicate: ASP.NET: Web Site or Web Application? I have noticed that there is
I have a solution that contains an ASP.NET Web Site (file-based) project. I'm currently
I have a asp.net web site that was developed on the .Net Framework v2
I have an ASP.NET Web Forms web site. It has a page inside of
I have an ASP.net Web Site Project (.net 3.5). Currently all of the non-code
We have a web site built as an 'ASP.NET Website' type project, rather than
We have an asp.net c# web site in team foundation server. Our project includes
I'm using an asp.net 4 web site project (C#) in VS2008 and I have
I have an ASP.Net web site (ASPX and ASMX pages) with a single web.config

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.