W3C Validator Fehler: document type does not allow element "a" here

Diskutiere mit über: W3C Validator Fehler: document type does not allow element "a" here im Web Page Design Forum

  1. sevY

    sevY Thread Starter Gast

    N'amd zusammen :)

    Kurz und schmerzlos:

    W3C Validator Fehler: document type does not allow element "a" here

    Was hab ich schlimmes getan? Und wenn, was kann ich als alternative machen?


    PHP:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <
    html xmlns="http://www.w3.org/1999/xhtml">
    <
    head>
    <
    meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <
    meta http-equiv="expires" content="14" />
    <
    meta name="description" content=x"" />
    <
    meta name="keywords" lang="de" content="x" />
    <
    meta name="robots" content="all" />
    <
    meta name="revisit-after" content="14 days" />
    <
    meta name="author" content="x" />
    <
    meta name="publisher" content="x" />
    <
    link rel="stylesheet" type="text/css" href="default.inc.css" />
    <
    link rel="shortcut icon" type="image/ico" href="img/favicon.ico" />
    <
    script language="javascript" type="text/javascript" src="function.inc.js"></script>
    <title>x</title>
    </head>
    <body>
    <div class="main">
        <div class="content">
            <div class="center">
                <script language="javascript" type="text/javascript">            
                    if(hasRightVersion) 
                        {
                        document.write('<a href="flash.php" target="_self" title="Click to enter"><img src="img/enter.gif" alt="enter" /></a>');
                        } 
                    else 
                        {
                        document.write('<a href="http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" target="_self" title="Get Macromedia Flashplayer"><img src="img/get_flash_player.gif" alt="Get Macromedia Flashplayer" /></a>');
                        }
                </script>
                <noscript>
                    <img src="img/enable_javascript.gif" alt="Enable JavaScript" />
                </noscript>
                <div class="bottom">
                    <a href="impressum.php" target="_self" title="Impressum">
                        <img src="img/impressum.gif" alt="Impressum" />
                    </a>
                </div>
            </div>
        </div>
    </div>
    </body>
    </html>
     
  2. sevY

    sevY Thread Starter Gast

    W3C sprach:

     
  3. sevY

    sevY Thread Starter Gast

    Ok.


    document.write() und XHTML vertragen sich nicht.

    Das hier ist die Lösung:

    PHP:
    <?php require_once('head.inc.php'); ?>
    <body>
    <div class="main">
        <div class="content">
            <div id="write" class="center">
                <script language="javascript" type="text/javascript">   
                if(hasRightVersion) 
                    {
                    if(document.createElementNS)
                        {
                        var enter=document.createElementNS("http://www.w3.org/1999/xhtml", "input");
                        enter.setAttribute("type", "image");
                        enter.setAttribute("src", "img/enter.gif");   
                        enter.setAttribute("onclick", "javascript:window.location.href='flash.php'");     
                        document.getElementById("write").appendChild(enter);
                        }
                    }
                else
                    {
                    if(document.createElementNS)
                        {
                        var plugin=document.createElementNS("http://www.w3.org/1999/xhtml", "input");
                        plugin.setAttribute("type", "image");
                        plugin.setAttribute("src", "img/get_flash_player.gif");   
                        plugin.setAttribute("onclick", "javascript:window.location.href='http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash'");     
                        document.getElementById("write").appendChild(plugin);
                        }
                    }
                </script>
                <noscript>
                    <img src="img/enable_javascript.gif" alt="Enable JavaScript" />
                </noscript>
                <div class="bottom">
                    <a href="impressum.php" target="_self" title="Impressum">
                        <img src="img/impressum.gif" alt="Impressum" />
                    </a>
                </div>
            </div>
        </div>
    </div>
    </body>
    </html>

    Yves
     
Die Seite wird geladen...
Ähnliche Themen - W3C Validator Fehler Forum Datum
HTML-Rechner, wo liegt mein Fehler?? Web Page Design 12.11.2016
Seite wird nicht gefunden. Web Page Design 29.11.2013
Fehler bei iweb, cyberduck, html hochladen Web Page Design 12.03.2012
Safari – Fehler in der Darstellung Web Page Design 24.11.2009
CSS Hilfe / Finde den Fehler nicht Web Page Design 28.09.2008

Diese Seite empfehlen

Benutzerdefinierte Suche