Antworten auf deine Fragen:
Neues Thema erstellen

Antworten zum Thema „Problem mit validator“

dodo1912

Noch nicht viel geschrieben

folgendes Code-Stück macht einfach nicht was ich will:

1. Die Schrift die die Eingabefelder beschreibt ist nicht mit der Klasse text formatiert - sollte es aber.
2. ausserdem hat der Validator was zu meckern. Ich weiß aber echt nicht was

[php:1:4c757e1142]
<p class="text">Kontaktformular</p>
<table border="0" cellpadding="1" cellspacing="10">
<div class="text">
<form action="kontakt.php" method="post">
<tr>
<td>Name:</td>
<td><input name="Name" style="background-color:#990000; color:#FFFFFF" size="20" type="text"></td>
</tr>
<tr>
<td>eMail:</td>
<td><input name="Email" style="background-color:#990000; color:#FFFFFF" size="20" type="text"></td>
</tr>
<tr>
<td>Betreff:</td>
<td><select name="Betreff" size="1" style="background-color:#990000; color:#FFFFFF"><option>Hilfe</option>
<option>Kritik</option><option>Werbung</option></select></td>
</tr>
<tr>
<td>Nachricht:</td>
<td><textarea class="kontakt" cols="40" name="Nachricht" rows="7" style="background-color:#990000; color:#FFFFFF"></textarea></td>
</tr>
<tr>
<td>Wünsche Antwort:</td>
<td>
Ja <input name="Antwort" style="background-color:#990000" checked type="radio" value="ja">
Nein <input name="Antwort" style="background-color:#990000" type="radio" value="nein">
</td>
</tr>
<tr>
<td align="center" colspan="2"><input name="Send" type="submit" value="Abschicken"> <input name="Reset" type="reset" value="Löschen"></td>
</tr>
</form>
</div>
</table>
<div class="text">
<?php

$Empfaenger = "webmaster@dodo1912.de";

if($_REQUEST['Send'])
{
if(empty($_REQUEST['Name']) || empty($_REQUEST['Email']) || empty($_REQUEST['Nachricht']))
{
echo"Bitte füllen Sie alle Felder aus!";
}
else
{
$Mailnachricht = "Sie haben folgende Nachricht erhalten: \n\n";
while(list($Formularfeld, $Wert)=each($_REQUEST))
{
if($Formularfeld!="Send")
{
$Mailnachricht .= $Formularfeld.": ".$Wert."\n";
}
}
$Mailnachricht .= "\nDatum/Zeit: ";
$Mailnachricht .= date("d.m.Y H:i:s");
$Mailbetreff = "Kontakt: ";
$Mailbetreff .= $_REQUEST['Betreff'];
mail($Empfaenger, $Mailbetreff, $Mailnachricht, "From: ".$_REQUEST['Email']);
echo"Vielen Dank für Ihre eMail!";
}
}
else
{
echo"Bitte füllen sie alle Felder aus und senden sie das Formular ab";
}

?>
</div>
[/php:1:4c757e1142]

Hier das Ergebnis der Validation:

[php:1:4c757e1142]
Below are the results of attempting to parse this document with an SGML parser.

1. Error Line 128 column 18: document type does not allow element "DIV" here.

<div class="text">

The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).


2. Error Line 130 column 3: document type does not allow element "TR" here.

<tr>

The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).


3. Error Line 134 column 3: document type does not allow element "TR" here.

<tr>

The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).

................
......
....Noch etliche male das gleiche (wegen dem TR)
[/php:1:4c757e1142]
die url zu der Seite:
[/php]
 

dodo1912

Noch nicht viel geschrieben

"tr" ist hier nicht erlaubt...klasse! ;)

Das hab ich auch beim engl. schon bemerkt :oops:

da ist sicherlich was in der Reihenfolge der Tables und Divs verwurschtelt...ich find aber nicht was...hab die schon paar mal umgewürfelt...aber hat nichts genutzt
 
B

burni

Guest

Hi,

Zu 1) Dann solltest Du es dem "input" auch mitteilen
<input name="Name" style="background-color:#990000; color:#FFFFFF; font-face:..." size="20" type="text"></
(Punkte durch die gewünschte Schriftart austauschen)
oder eine eigene Klasse in der css-Datei definieren (Wäre bestimmt geschickter)



Zu 2)

hast form und div zwischen <table> und <tr> gebaut:

Vorher
<table border="0" cellpadding="1" cellspacing="10">
<div class="text">
<form action="kontakt.php" method="post">
<tr>

...

</tr>
</form>
</div>
</table>

Nachher
<div class="text">
<form action="kontakt.php" method="post">
<table border="0" cellpadding="1" cellspacing="10">
<tr>

...

</tr>
</table>
</form>
</div>

Die Src-URL in der Ausgabe vorher:
online.gif

Nachher:
(Unterstriche entfernen, ließ sich leider nicht posten)

Grüße

P.S. Kein PHP-Problem
 

dodo1912

Noch nicht viel geschrieben

SUPER! hat alles geklappt! Jetzt ist auch diese Seite valid....;)

wuerdest du mir noch ne Seite checken? wenn ich den Fehler nicht selber finde? Das ist mir nämlich ansich wichtig, dass ich das selbst machen kann - da lernt man auch was. Aber so wie in dem obigen Fall wusste ich echt nicht weiter...
 
B

burni

Guest

Irgendwer wird schon helfen können... sind schon einige hier die sich damit auskennen ;)
 

dodo1912

Noch nicht viel geschrieben

ja das stimmt...

ich hab aber alles (bis jetzt) alleine geschafft *stolz*. Muss jetzt noch 3 Seiten checken...dann ist alles valid.

und dann baue ich das Design um und fange von Vorne an :oops:
 
Bilder bitte hier hochladen und danach über das Bild-Icon (Direktlink vorher kopieren) platzieren.
Antworten auf deine Fragen:
Neues Thema erstellen

Willkommen auf PSD-Tutorials.de

In unseren Foren vernetzt du dich mit anderen Personen, um dich rund um die Themen Fotografie, Grafik, Gestaltung, Bildbearbeitung und 3D auszutauschen. Außerdem schalten wir für dich regelmäßig kostenlose Inhalte frei. Liebe Grüße senden dir die PSD-Gründer Stefan und Matthias Petri aus Waren an der Müritz. Hier erfährst du mehr über uns.

Stefan und Matthias Petri von PSD-Tutorials.de

Nächster neuer Gratisinhalt

03
Stunden
:
:
25
Minuten
:
:
19
Sekunden

Neueste Themen & Antworten

Flatrate für Tutorials, Assets, Vorlagen

Zurzeit aktive Besucher

Statistik des Forums

Themen
175.189
Beiträge
2.582.077
Mitglieder
67.259
Neuestes Mitglied
SaschMasch1312
Oben