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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T19:54:04+00:00 2026-05-11T19:54:04+00:00

Browser : IE6/IE7. I want to load a new document into my html modal

  • 0

Browser : IE6/IE7.

I want to load a new document into my html modal dialog, either via a form target or a javascript function.

<html> <!-- quirks mode -->
<head>
<script>
function openModal(url) {
    if(window.showModalDialog)  showModalDialog(url);
    else {
        try {
            netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserWrite");
            open(url, "", "modal=yes");
        } catch (e) {
            alert("dialog windows unsupported by browser");
        }
    }
}
</script>
</head>
<body style="background:red" onload="setTimeout(function(){document.body.style.backgroundColor='white'},100)">
<a href="javascript:openModal(location.href)">Open Modal</a>
<form>
<input type="submit" value="Send Form" />
</form>
<a href="javascript:location.reload()">Reload content</a>
</body>
</html>

In Gecko-based browsers, it works.

In IE, when in the modal dialog window, the form opens a new window (even if I specify the target="_self" attribute), and the javascript reload() fails silently. If I try to do a location.replace(location.href) or location.href=_someurl_, it opens a new window.

So my question : how can I get IE to replace the current document in a modal dialog window?

  • 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-11T19:54:04+00:00Added an answer on May 11, 2026 at 7:54 pm

    A solution that handles the <form> part of the problem : add

    <base target="_self" />
    

    in the <head> section of the page.

    It doesn’t resolve the javascript issue, though.

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

Sidebar

Related Questions

I want to only allow users with IE8 (not IE6, IE7) or another browser
I want to apply javascript and CSS to all browser but not to IE6
I want to check how my site is working with ie6, ie7. So I
Is there any way to differentiate IE7 versus IE6 using PHP's get_browser() function?
The following dropdown menu works fine in modern browsers (IE7/firefox) but not in IE6.
I'm having an issue with IE7. In IE6, Firefox and other browsers, the DIV
We need to conditionally disable GZIP compression if user's browser is IE6 (it hangs
Why am I getting an error in my json use in ie6 and ie7,
What is the syntax if I want to load a css file in my
My web site want to be open IE7 and above .If IE 6 ,I

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.