PDA

View Full Version : Why is this now w3c valid code?



joda
Jan 9th, 2011, 03:08 AM
Hi!
maybe this post is not for this forum but maybe it its...
Sorry if not.

So, I have a code which is not valid by w3c and I can not figure out why.
But, if I run the same code whit a different filename on the server then it is valid.

Here is the code:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<link href="ces_kuf.css" rel="stylesheet" type="text/css" />

<script language="javascript" type="text/javascript" src="/LKP/java_script/datetimepicker.js"></script>

<title>Pretraga</title>

</head>

<body id="body_setup">
<div id="glavni_div">
<div id="levi-heder" class="boja1">
<img alt="logo" style="margin-top:10px; margin-left:20px;" src="/LKP/images/logo.png" border="0" /></div>
<div id="desni-heder" class="boja1">
Ukupno zaduzenje prema dobavljacima: 1759.29<br />Ukupno placeno dobavljacima: 256.00<br />Saldo: 1503.29din.<b style="color:red;"> dugovanje!</b>
</div>
<div class="boja2_tabela naslov_pretrage ">
<p style="padding-left:20px; font-size:20px; margin-top:10px; font-family:Arial, Helvetica, sans-serif; float:left;">Pretraga baze:</p>
<div style="float:right;">
<form method="get" action="/LKP/index.php" style="float:left;">
<input type="submit" value="Home" />
</form>
<form method="get" action="index.php" style="float:left;">
<input type="submit" value="Nazad" />
</form>
</div>
</div>
<div class="opis_unosa_pretrage">
<form method="post" id="pretraga" class="boja3_tabela" action="pretraga.php" >
<table style="width:auto; margin-left:auto; margin-right:auto;" class="table-font boja4_tabela" border="0">
<tr class="boja1_tabela" style="text-align:center;">
<td width="100">Datum prijema</td>
<td width="120">Ime dobavljaca</td>
<td width="121">Mesto dobavljaca</td>
<td width="100">BR. fakture</td>
<td width="101">Datum fakture</td>
<td width="90">Rok placanja</td>
<td width="150">Ziro racun dobavljaca</td>
<td width="100">Datum placanja</td>
<td width="80">BR. izvoda</td>
</tr>
<tr>
<td><Input class="no_input_boarder" readonly="readonly" onclick="javascript:NewCal('datum_prijema','ddmmyyyy')" id="datum_prijema" type="text" name="datum_prijema" style="width:100px; background-image:url(/LKP/images/calendar.png); background-repeat:no-repeat; background-position:right; padding-left:3px; padding-right:3px;" /></td>
<td><Input class="no_input_boarder" type="text" name="ime_dobavljaca" style="width:120px" /></td>
<td><Input class="no_input_boarder" type="text" name="mesto_dobavljaca" style="width:120px" /></td>
<td><Input class="no_input_boarder" type="text" name="br_fakture" style="width:100px" /></td>
<td><Input class="no_input_boarder" type="text" name="datum_fakture" id="datum_fakture" onclick="javascript:NewCal('datum_fakture','ddmmyyyy')" style="width:100px; background-image:url(/LKP/images/calendar.png); background-repeat:no-repeat; background-position:right; padding-left:3px; padding-right:3px;"/></td>
<td><Input class="no_input_boarder" readonly="readonly" id="rok_placanje" onclick="javascript:NewCal('rok_placanje','ddmmyyyy')" type="text" name="rok_placanje" style="width:100px; background-image:url(/LKP/images/calendar.png); background-repeat:no-repeat; background-position:right; padding-left:3px; padding-right:3px;" /></td>
<td><Input class="no_input_boarder" type="text" name="ziroracun_dobavljaca" style="width:150px" /></td>
<td><Input class="no_input_boarder" readonly="readonly" type="text" name="datum_placeno" onclick="javascript:NewCal('datum_placeno','ddmmyyyy')" style="width:100px; background-image:url(/LKP/images/calendar.png); background-repeat:no-repeat; background-position:right; padding-left:3px; padding-right:3px;" /></td>
<td><Input class="no_input_boarder" type="text" name="br_izvoda" style="width:80px" /></td>
</tr>
</table>
<br />
<input type="button" value="PRETRAGA" onclick="this.form.submit()" style="width:100px; height:30px; font-weight:bold; font-size:13px; font-family:Arial, Helvetica, sans-serif; margin-bottom:10px; margin-left:30px;" />
</form>
</div>
......

This is a fraction of the code and here is what I get from w3c by validating:


Line 47, Column 22: there is no attribute "class"
<td><Input class="no_input_boarder" readonly="readonly" onclick="javascript…


or



Line 47, Column 50: there is no attribute "readonly"
…put class="no_input_boarder" readonly="readonly" onclick="javascript:NewCal('d…


or



Line 47, Column 141: there is no attribute "type"
…,'ddmmyyyy')" id="datum_prijema" type="text" name="datum_prijema" style="width…


I don't know what they exactly mean?
On every output I got the message does my elements are not supported and so on...

As I can see I use the Transitional doc type and the first sentence say:


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.


What should I do?
Any idea?

Thank you....

tracknut
Jan 9th, 2011, 04:10 AM
<Input

If you're going to use xhtml, your tags need to be lowercase. Try that, I think it'll help.

Dave

joda
Jan 9th, 2011, 08:12 PM
Thank you very much!
I missed the capital letters ... my mistake and sorry for that.