IE7: Requires <BASE TARGET="frame"> inside <HEAD></HEAD>

Discussion in 'Internet Explorer' started by Peter Dow, May 13, 2008.

  1. Peter Dow

    Peter Dow Guest

    Websites (like mine) who use the <BASE TARGET="frame"> successfully in IE6
    now won't work in IE7. Simple things like some navigation menus won't work.

    Is anyone at Microsoft familiar with the concept of "backwards
    compatibility"? Your new version should at the very least perform as well as
    the previous version - otherwise there is no point in releasing it, other
    than in BETA.

    Here's the problem ...


    <HTML>
    <HEAD>
    <TITLE>Test HTML BASE TARGET="frame" </TITLE>
    </HEAD>
    <BODY>
    <BASE TARGET="new">
    <A HREF="about:blank">link 1</A> __
    <A HREF="about:blank" TARGET="new">link 2</A>
    </BODY>
    </HTML>

    In IE6, both links 1 and 2, open a new window. The HTML BASE statement
    defines the target frame for link 1.

    In IE7, the <BASE TARGET="new"> statement is ignored because it isn't inside
    the <HEAD></HEAD> statement where strictly it should be and so link 1 doesn't
    open a new window and the new page opens in the self-same window.

    Goodness me that is strict! I suppose MS is expecting HTML programmers to
    rewrite their webpages or can we expect a patch/fix/update to fix this and
    allow HTML IE6 programmers their little indulgences?

    - Peter
     
    Peter Dow, May 13, 2008
    #1
    1. Advertisements

  2. Peter Dow

    Peter Dow Guest

    As I discussed yesterday,

    IE7, unlike IE6, ignores <BASE> statements unless they are inside the
    <HEAD></HEAD> statements.

    In IE6, <BASE HREF=“......â€> statements could be used to change the base url
    / base uri from inside the page body.

    I used this to display images with relative SRC="..." statements used in the
    same HTML code fragments on different webpages with different base urls.

    That no longer works with IE7 it seems so I’m looking for the easiest edit
    to my webpages to cope and so now I am using Javascript to work around the
    problem of the failure of MS to implement backwards compatibility with IE6 to
    IE7.

    Putting a base statement inside the page head and giving it an ID like this
    <HEAD>
    <BASE ID="baseID">
    </HEAD>

    <BODY>

    Using a script to change the base url used for images

    <SCRIPT>
    document.all.baseID.href=".........";
    </SCRIPT>

    Changing the base url again to use for links on the whole page with -

    <BODY ONLOAD='document.all.baseID.href="........"'>

    Or for links in just some parts of the webpage with -

    <DIV ONMOUSEOVER='document.all.baseID.href="........";'>

    That kind of thing seems to work for my webpages although the mouseover
    introduces a flickering scroll bar which wasn't there before.

    - Peter
     
    Peter Dow, May 14, 2008
    #2
    1. Advertisements

  3. PA Bear [MS MVP], May 14, 2008
    #3
  4. Peter Dow

    Peter Dow Guest

    Peter Dow, May 14, 2008
    #4
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.