works in firefox but not in IE6

Discussion in 'HTML' started by Nospam, Jan 26, 2007.

  1. Nospam

    Nospam Guest

    I am a newbie to html and unable to decipher why this code works in firefox
    and not in IE6:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
    "http://www.w3.org/TR/html4/frameset.dtd">

    <html>

    <script type="text/javascript">
    var popup = false;
    function loadFlash(url, w, h) {
    //url = unescape(url.href);
    url = url.href.toString();
    url = url.substring(url.indexOf('?')+1);
    url = url+'&&'+w+'&&'+h;
    if(popup && !popup.closed) popup.close();
    popup =
    window.open('template3.html?'+url,'','width=880,height=700,resizable=1');
    popup.onload = function() {
    popup.document.getElementById('content').innerHTML = htm;
    }
    popup.focus();
    return false;
    }
    </script>




    <a onclick="loadFlash(this,480,380); return false"
    href="http://www.dailymotion.com/flash/flvplayer.swf?20061026012254&amp;url=
    http%3A%2F%2Fchi-v91.chi.youtube.com%2Fget_video%3Fvideo_id%3DDPzMvzWlmzw">
    Lost - 2007 Preview Moments 3</a>

    <a onclick="loadFlash(this,300,260); return false"
    href="http://www.dailymotion.com/flash/flvplayer.swf?20061026012254&amp;url=
    http%3A%2F%2Fchi-v119.chi.youtube.com%2Fget_video%3Fvideo_id%3Djf4hnNSaEeM">
    Lost - 2007 Preview Moments 1</a>



    </html>


    , the validator so far shows 5 errors:

    Error Line 26 column 203: document type does not allow element "A" here.
    ....2Fget_video%3Fvideo_id%3DDPzMvzWlmzw">

    Error Line 29 column 204: document type does not allow element "A" here.
    ....2Fget_video%3Fvideo_id%3Djf4hnNSaEeM">


    Error Line 34 column 6: "HEAD" not finished but containing element ended.
    </html>


    Error Line 34 column 6: end tag for "HTML" which is not finished.
    </html>


    The page is at http://watchanimation.awardspace.com/sample5.html
    It is meant to show an animation on clicking any of the two links, it works
    in firefox but not in IE, and I have run out of ideas as to why
     
    Nospam, Jan 26, 2007
    #1
    1. Advertising

  2. Nospam

    Rik Guest

    Please learn basic HTML before publishing anything on the web.
    You're lacking a <head> and a <body>.
    --
    Rik Wasmus
     
    Rik, Jan 26, 2007
    #2
    1. Advertising

  3. Nospam

    Nik Coughlin Guest

    Rik wrote:
    > Please learn basic HTML before publishing anything on the web.
    > You're lacking a <head> and a <body>.


    Neither are required.

    View the source of this page (html 4 strict) and then run it through the w3
    validator:
    http://csschanger.usenetshit.info/
     
    Nik Coughlin, Jan 26, 2007
    #3
  4. Rik wrote :
    > Please learn basic HTML before publishing anything on the web.


    Rik, our "Nospam" poster started his post with a "I am a newbie to
    html ..."

    > You're lacking a <head> and a <body>.
    > --Rik Wasmus


    HTML 4.01 Frameset doctype declaration indicates that the webpage markup
    code would require rather a <frameset>, not <body> ... and <frameset> is
    not optional.

    GĂ©rard
    --
    remove blah to email me
     
    =?ISO-8859-15?Q?G=E9rard_Talbot?=, Jan 26, 2007
    #4
  5. Nospam

    Nospam Guest

    Ok I finally got it pass the validtor but I am still stumped as to why it
    works in firefoxs but not in IE6

    The updated code is now:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">


    <html>
    <head> <title>Lost preview</title>
    <script type="text/javascript">
    var popup = false;
    function loadFlash(url, w, h) {
    //url = unescape(url.href);
    url = url.href.toString();
    url = url.substring(url.indexOf('?')+1);
    url = url+'&&'+w+'&&'+h;
    if(popup && !popup.closed) popup.close();
    popup =
    window.open('template3.html?'+url,'','width=880,height=700,resizable=1');
    popup.onload = function() {
    popup.document.getElementById('content').innerHTML = htm;
    }
    popup.focus();
    return false;
    }
    </script>
    </head>

    <body>

    <a onclick="loadFlash(this,480,380); return false"
    href="http://www.dailymotion.com/flash/flvplayer.swf?20061026012254&amp;url=
    http%3A%2F%2Fchi-v91.chi.youtube.com%2Fget_video%3Fvideo_id%3DDPzMvzWlmzw">
    Lost - 2007 Preview Moments 3</a>

    <a onclick="loadFlash(this,300,260); return false"
    href="http://www.dailymotion.com/flash/flvplayer.swf?20061026012254&amp;url=
    http%3A%2F%2Fchi-v119.chi.youtube.com%2Fget_video%3Fvideo_id%3Djf4hnNSaEeM">
    Lost - 2007 Preview Moments 1</a>

    </body>

    </html>

    http://watchanimation.awardspace.com/sample5.html
     
    Nospam, Jan 27, 2007
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dennis McCarthy

    CheckBoxField works in Firefox but not in IE6

    Dennis McCarthy, Jan 25, 2007, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    111
    Dennis McCarthy
    Jan 25, 2007
  2. David Springthorpe

    Works OK In IE6 But Not In Mozilla Firefox 0.9.2

    David Springthorpe, Aug 22, 2004, in forum: Javascript
    Replies:
    1
    Views:
    89
    Michael Winter
    Aug 22, 2004
  3. DamonChong
    Replies:
    4
    Views:
    94
    Damon Chong
    Dec 29, 2005
  4. Mark Noten
    Replies:
    1
    Views:
    128
  5. Steve Wright

    AJAX works in IE6 but not IE7 or Firefox

    Steve Wright, Mar 13, 2007, in forum: Javascript
    Replies:
    5
    Views:
    154
    Bart Lateur
    Mar 15, 2007
Loading...

Share This Page