Login-Formular - IE zeigt es nicht an?

Status
Nicht offen für weitere Antworten.

Radhad

Erfahrenes Mitglied
Hi zusammen,

ich füge auf meiner index.php per include ein Login-Formular hinzu (http://www.radhad.de). Dieses Formular wird im Firefox 2.0 schön angezeigt. im IE7 & 6 sieht man nur ein komisches Kästchen. Diesi st aber erst so, seitdem ich die Seiten versuche XHTML 1.0 Transitional valid zu machen. Hier das entsprechende Login-Formular:
PHP:
<?php
	echo "<object><form action=\"login_user.php?link=".rawurlencode("http://".$_SERVER['HTTP_HOST']."".$_SERVER['REQUEST_URI'])."\" method=\"post\" class=\"formular\"><fieldset>
		<input class=\"formcheckbox\" type=\"checkbox\" name=\"autologin\" /> Auto-Login
		<input class=\"formfeld\" type=\"text\" name=\"name\" size=\"15\" value=\"Benutzername\" onblur=\"if (value =='') {value = 'Benutzername'}\" onfocus=\"if (value == 'Benutzername') {value =''}\" />
		<input class=\"formfeld\" type=\"password\" name=\"pwd\" size=\"15\" value=\"Kennwort\" onfocus=\"if (value == 'Kennwort') {value =''}\" />
		<input id=\"formbuttonlogin\" type=\"submit\" value=\"Login\" /></fieldset>
	</form></object>";
?>
Kann mir dabei jemand helfen, den Fehler zu beheben?



Gruß Radhad
 
Hallo!

Nun, ich vermute mal dass es daran liegt dass ein Formular kein Object ist.
Also entferne mal die <object>-Tags und guck dann nochmal.

Gruss Dr Dau
 
Jetzt geht es aber die Seite ich nicht mehr Valid:
Code:
1. Error  Line 17 column 212: document type does not allow element "form" here; missing one of "object", "applet", "map", "iframe", "ins", "del" start-tag.
...d%3D1" method="post" class="formular"><input type="hidden" name="PHPSESSID" v

The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
Wie bekomme ich die Website dann wieder valid?
 
Das Element <form> darf nicht im Element <p> stehen.
Es darf aber das Element <p> im Element <form> stehen..... und <form> wiederum darf im Element <div> stehen.
Siehe auch die HTML-Elementreferenz von SelfHTML.
 
Ah, die Website kannte ich noch nicht. vielen Dank! Ich brauchte nur das p-Tag verschieben und jetzt klappt es wieder!


Gruß Radhad
 
Status
Nicht offen für weitere Antworten.
Zurück