Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [xhtml] dziwny blad walidatora
Caw
post
Post #1





Grupa: Zarejestrowani
Postów: 40
Pomógł: 0
Dołączył: 13.03.2005

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


Witam napisałem strone jako XHTML 1.0 Strict poprawiłem już wszytskei błedy i został mi jeden następującej treści:

Cytat
Line 17, Column 29: there is no attribute "name".

<img src="zd/start.jpg" name="rov1" alt="index" width="60px" height="16px" /><…

You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.



Menu na mojej stronie zrobiłem jako ROOLOVER za pomocą takiego sposobu:

<div id="menu">

<a href="index.html" onmouseover="rov1.src='zd/start_vis.jpg'" onmouseout="rov1.src='zd/start.jpg'">
<img src="zd/start.jpg" name="rov1" alt="index" width="60px" height="16px" /></a>

<a href="portfolio.html" onmouseover="rov2.src='zd/portfolio_vis.jpg'" onmouseout="rov2.src='zd/portfolio.jpg'">
<img src="zd/portfolio.jpg" name="rov2" alt="portfolio" width="97px" height="16px" /></a>

<a href="about.html" onmouseover="rov3.src='zd/about_vis.jpg'" onmouseout="rov3.src='zd/about.jpg'">
<img src="zd/about.jpg" name="rov3" alt="portfolio" width="73px" height="16px" /></a>

<a href="kontakt.html" onmouseover="rov4.src='zd/kontakt_vis.jpg'" onmouseout="rov4.src='zd/kontakt.jpg'">
<img src="zd/kontakt.jpg" name="rov4" alt="kontakt" width="96px" height="16px" /></a>

<a href="greatest.html" onmouseover="rov5.src='zd/greatest_vis.jpg'" onmouseout="rov5.src='zd/greatest.jpg'">
<img src="zd/greatest.jpg" name="rov5" alt="greatest" width="100px" height="16px" /></a>

<a href="skills.html" onmouseover="rov6.src='zd/skills_vis.jpg'" onmouseout="rov6.src='zd/skills.jpg'">
<img src="zd/skills.jpg" name="rov6" alt="greatest" width="71px" height="16px" /></a>

</div> <!-- menu -->


Czy jest to niepoprawny i zabroniony w XHTML sposób? czy chodzi o atrybut NAME? i dlaczego pokazuje tylko w jednym miejscu a nie zakreśliło mi wszystkich. Walidator wywala mi tylko jeden błąd tam gdzie jest name="rov1" atrybut ten musi być bo bez niego nie działa.

Ten post edytował Caw 2.02.2008, 20:45:53
Go to the top of the page
+Quote Post
maciejkiner
post
Post #2





Grupa: Zarejestrowani
Postów: 45
Pomógł: 2
Dołączył: 7.03.2004

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


Witam

Zamiast name="abc" mozesz dac id="abc" i odwolywac sie przez:

  1. document.getElementById("abc").src=""


pzdr
maciejkiner
Go to the top of the page
+Quote Post
Caw
post
Post #3





Grupa: Zarejestrowani
Postów: 40
Pomógł: 0
Dołączył: 13.03.2005

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


samo id wystarczyło własnie sam wpadłem ze NAME nie wolno "This Page Is Valid XHTML 1.0 Strict!" (IMG:http://forum.php.pl/style_emoticons/default/winksmiley.jpg)



TEMAT DO KASACJI
Go to the top of the page
+Quote Post
misiek08
post
Post #4





Grupa: Zarejestrowani
Postów: 91
Pomógł: 6
Dołączył: 2.02.2008

Ostrzeżenie: (10%)
X----


Błąd mówi, że twój typ dokumentu nie obsługuje atrybutu name dla znacznika img czyli tak jak @up napisał zamien na np id lub pomiń jeżeli nie musisz się do niego odwoływać
Go to the top of the page
+Quote Post
koderrr
post
Post #5





Grupa: Zarejestrowani
Postów: 255
Pomógł: 16
Dołączył: 4.07.2007

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


jesli zalezy ci na walidacji
i ogolnej jakosci kodu

to nie wiem dlaczego to menu nie jest oparte o liste
Go to the top of the page
+Quote Post

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

 



RSS Aktualny czas: 22.08.2025 - 22:11