Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [html/php] Walidacja vs <meta http-equiv='Refresh' content='
Jarod
post 18.06.2006, 20:48:49
Post #1





Grupa: Zarejestrowani
Postów: 1 190
Pomógł: 27
Dołączył: 23.04.2005

Ostrzeżenie: (0%)
-----


Mam następujący problem. Potrzebuję w skrypcie przekierować użytkownika na jakąś stronę. Jeśli mogę to używam header.

Ale czasami potrzebuję przekierować po upływie np 3 sekund. W tym celu zastosowałem coś takiego:

Kod
<meta http-equiv='Refresh' content='3; url=index.php' />


Niestety walidator się pluje;
Cytat
Line 21 column 481: document type does not allow element "meta" here.

...='Refresh' content='3; url=index.php' />

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).


Jak obejść ten problem?


--------------------
”Godzina nauki w życiu nowoczesnego apostoła jest godziną modlitwy.”
(św. Josemaría Escrivá, Droga, 335)
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 14.08.2025 - 01:02