free
28.05.2007, 09:54:45
W poniższym kodzie parser XHTML podaje błąd:
<input name="login" class="log" value="login" onblur="if(this.value=='')this.value='login'" onfocus="if(this.value=='login')this.value=''" type="text" />
]
Jak to zmodyfikowac by byl poprawny z W3C:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
mike
28.05.2007, 10:02:35
A nie sądzisz, że można by podać treść tego błędu?
Skąd mamy wiedzieć co jest nie tak? Jasnowidzów na forum brak.
Polecam:
Jak mądrze zadawać pytania
free
28.05.2007, 10:23:32
document type does not allow element "input" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag.
onfocus="if(this.value=='login')this.value=''" type="text" />
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>").
mike
28.05.2007, 10:28:11
Od razu prościej, nie?
Masz tag
<input /> umieszczony w złym miejscu. Pewnie dałeś go od razu w <form /> albo gdzieś gdzie nie jest dozwolony.
Aby był poprawnie umieszczony musi się znaleźć w jednym z mymienionych tagów.
Zresztą czy tak trudno wejść na
translatica.pwn.pl i samemu przetłumaczyć frazę:
"document type does not allow element "input" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag."Przeciez całe wytłumaczenie masz w treści tego komunikatu.
free
28.05.2007, 10:33:11
wiem tez sie domyslilem juz sprawdzilem. Dopiero zaczynam z XHTML, dotychczas korzystałem z HTML 4.01.