Click to See Complete Forum and Search --> : XHTML Validation


jubcheng
08-12-2006, 10:35 PM
Hi.

I got on all my pages a few erroros but they are all the same.
Can someone help by telling how I can correct these errors?
1st there is a mismatch:
The character encoding specified in the HTTP header (windows-1252) is different from the value in the <meta> element (iso-8859-1). I will use the value from the HTTP header (windows-1252) for this validation. I cant find an entry in the header that shows (windows 1252).
Maybe you can help?

Thank yoy very much.

Cheng
Here are the errors shown in red:
Error Line 17, column 12: there is no attribute "SRC" .
<script SRC="FlashLoad.js"></script>

Error Line 17, column 26: required attribute "type" not specified .
<script SRC="FlashLoad.js"></script>

Error Line 25, column 15: required attribute "type" not specified .
<script>FlashLoad(7,'TopMenu_on_en.swf','#fff',780,120);</script>

Error Line 31, column 13: required attribute "type" not specified .
<script>FlashLoad(7,'menu1_online_en.swf','#fff',144,365);</script>

Error Line 60, column 91: document type does not allow element "img" here; missing one of "a", "span", "bdo", "tt", "i", "b", "u", "s", "strike", "em", "strong", "dfn", "code", "q", "samp", "kbd", "var", "cite", "abbr", "acronym", "label", "button", "ins", "del" start-tag .
...gif" alt="" width="260" height="66" /></pre>

web_roshan
08-12-2006, 10:47 PM
I don't know much about XHTML, but any tag in XHTML have to be in lowercase.

ie. SRC should be src

Also, check your meta tag in the <head> section of your code.

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset='check this code/value' ">

jubcheng
08-12-2006, 10:59 PM
Hi web_roshan

Thanks for your reply.
I changed it to lowercase allready but the error is still the same.
And in the meta tag there is no entry that says (windows1252)
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
Nowhere in in the header it says windows 1252.
If can get rid of these few errors the whole site will be clean.

Thanks again.

Cheng

web_roshan
08-12-2006, 11:11 PM
Aah..for the script tag, include a type attribute.
i.e.


<script type="text/javascript" src="flash.js">
</script>


I am bit confused about the charset, and I'll see if I can solve that problem

jubcheng
08-12-2006, 11:44 PM
.......thanks a lot.
I realy appreciate it.
It seems like the error is gone after I changed the end tag:

<script type="text/javascript" src="FlashLoad.js" />

felgall
08-13-2006, 12:09 AM
While that script tag may be valid XHTML the various browsers look for a </script> tag and will choke on code like you have. Only use self closing tags with current browsers where there was no closing tag required in HTML.

jubcheng
08-13-2006, 12:28 AM
Hi felgall.

I made a mistake, there is still an error showing in the validator.
Here the script I added:

<script type="text/javascript" src="flashload.js" /></script>

Now the error is shown at the end of the tag marked in red.
Do you have an idea how to enter it correctly?
That would be great.

Thank you very much.

Cheng

NogDog
08-13-2006, 01:08 AM
<script type="text/javascript" src="flashload.js"></script>

(No "/>" when you have a separate closing tag.)
The character encoding specified in the HTTP header (windows-1252)
This is probably a header either being sent by your webserver or by the script which generates the page (if there is such a script), rather than being part of the XHTML mark-up.

jubcheng
08-13-2006, 01:36 AM
Hi NogDog.

That was it.
The error is gone.
Could you please help me with this 2 here as well? (error is marked in red)
If I can get rid of these 2 I would be done except for the (windows 1252)

Thank you very much, I could not manage this on my own.

Cheng
Error Line 25 column 15: required attribute "type" not specified.
<script>flashload(7,'TopMenu_on_en.swf','#fff',780,120); </script>
Error Line 51 column 91: document type does not allow element "img" here; missing one of "a", "span", "bdo", "tt", "i", "b", "u", "s", "strike", "em", "strong", "dfn", "code", "q", "samp", "kbd", "var", "cite", "abbr", "acronym", "label", "button", "ins", "del" start-tag.
...gif" alt="" width="260" height="66" /></pre>

NogDog
08-13-2006, 01:46 AM
<script type="text/javascript">flashload(7,'TopMenu_on_en.swf','#fff',780,120); </script>

For the IMG tag problem, the standard prohibits the use of IMG, OBJECT, BIG, SMALL, SUB, or SUP elements within a PRE element. Therefore you either need to use something else other than <pre> for the block containing your <img>, or else move the <img> outside of the <pre> block.

jubcheng
08-13-2006, 02:10 AM
Hi NogDog.

I appreciate it very much but the last script did not work.
It wont load the flash file.
I need this javascript to load the flash file in order to get rid of the dotted line in IE and the message (click to activate this control)
Hopefully there is another way how the script can be added without having an error in the validation.

Thanks again very much.

Cheng.