View Full Version : I find errors/bugs I do NOT know how to correct - validator.w3.org ?

06-10-2008, 03:26 PM
I try validate with http://validator.w3.org the http://www.polis-realestate.eu/
but I find errors/bugs I do NOT know how to correct ? What about some of them below:

Line 263, Column 78: there is no attribute "height".
…cope="col"><table width="186" height="198" border="2" align="center" cellpadd✉
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.

Line 559, Column 149: general entity "max" not defined and no default entity.
…p?area=any&type=any&beds=any&min=200&max=5000" class="yellowlink">Villas✉
This is usually a cascading error caused by a an undefined entity reference or use of an unencoded ampersand (&) in an URL or body text. See the previous message for further details.

Line 559, Column 152: reference not terminated by REFC delimiter.
…rea=any&type=any&beds=any&min=200&max=5000" class="yellowlink">Villas✉
If you meant to include an entity that starts with "&", then you should terminate it with ";". Another reason for this error message is that you inadvertently created an entity by failing to escape an "&" character just before this text.

Line 559, Column 152: reference to external entity in attribute value.
…rea=any&type=any&beds=any&min=200&max=5000" class="yellowlink">Villas✉
This is generally the sign of an ampersand that was not properly escaped for inclusion in an attribute, in a href for example. You will need to escape all instances of '&' into '&amp;'.

Line 559, Column 152: reference to entity "max" for which no system identifier could be generated.
…rea=any&type=any&beds=any&min=200&max=5000" class="yellowlink">Villas✉
This is usually a cascading error caused by a an undefined entity reference or use of an unencoded ampersand (&) in an URL or body text. See the previous message for further details.

Line 559, Column 148: entity was defined here.
…hp?area=any&type=any&beds=any&min=200&max=5000" class="yellowlink">Villas

06-10-2008, 10:46 PM
Take a look at http://www.thetestingsite.net/test/dd/leon/index.html and you will see that it validates. Simply view the page source and you are good to go on that. Some key changes I made were the following:

- Changed Doctype from XHTML to HTML 4.01 Strict
- Went through and got rid of deprecated code (such as language="Javascript" and stuff like that).
- Fix all the other issues that the validator spit out.

Please keep in mind, that this is just the index page and any other pages you will need to fix as well (also, you will want to take out the <base href=""> part).
Hope this helps.

06-16-2008, 12:52 PM
Is it wrong, to replace all ampersands with encoded-ampersands in code view dw cs3 ? I mean ALL ...

06-16-2008, 12:57 PM
Is it wrong, to replace all ampersands with encoded-ampersands in code view dw cs3 ? I mean ALL ...

In fact, all apersands in your markup should be encoded as &amp; -- even in URLs.

06-17-2008, 08:03 PM
I think js image slide show do not work due to convert ampersands to encoded-ampersands in code view , well is leftmost topmost image , what to do to work ?
Is script at http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm

<script type="text/javascript">

* Ultimate Fade-In Slideshow (v1.51): © Dynamic Drive (http://www.dynamicdrive.com)
* This notice MUST stay intact for legal use http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm
* Visit http://www.dynamicdrive.com/ for this script and 100s more.

var fadeimages=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages[0]=["../images/gif/big-mr72px200x160wletters.jpg", "http://www.holidayaptsaspasia.com", ""] //plain image syntax
fadeimages[1]=["../images/gif/front1px72-200x160.jpg", "http://www.holidayaptsaspasia.com", ""] //image with link syntax
fadeimages[2]=["../images/gif/living-canvas.jpg", "http://www.holidayaptsaspasia.com", ""] //image with link and target
fadeimages[3]=["../images/gif/sunset-best72px200x160.jpg", "http://www.holidayaptsaspasia.com", ""] //image with link and target

var fadeimages2=new Array() //2nd array set example. Remove or add more sets as needed.
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages2[0]=["photo1.jpg", "", ""] //plain image syntax
fadeimages2[1]=["photo2.jpg", "http://www.cssdrive.com", ""] //image with link syntax
fadeimages2[2]=["photo3.jpg", "http://www.javascriptkit.com", "_new"] //image with link and target syntax

var fadebgcolor="white"

////NO need to edit beyond here/////////////

var fadearray=new Array() //array to cache fadeshow instances
var fadeclear=new Array() //array to cache corresponding clearinterval pointers

var dom=(document.getElementById) //modern dom browsers
var iebrowser=document.all

function fadeshow(theimages, fadewidth, fadeheight, borderwidth, delay, pause, displayorder){
this.degree=10 //initial opacity degree (10%)
if (typeof displayorder!="undefined")
theimages.sort(function() {return 0.5 - Math.random();}) //thanks to Mike (aka Mwinter) :)
this.postimages=new Array() //preload images
for (p=0;p<theimages.length;p++){
this.postimages[p]=new Image()

var fadewidth=fadewidth+this.imageborder*2
var fadeheight=fadeheight+this.imageborder*2

if (iebrowser&amp;&amp;dom||dom) //if IE5+ or modern browsers (ie: Firefox)
document.write('<div id="master'+this.slideshowid+'" style="position:relative;width:'+fadewidth+'px;height:'+fadeheight+'px;overflow:hidden;"><div id="'+this.canvasbase+'_0" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);opacity:0.1;-moz-opacity:0.1;-khtml-opacity:0.1;background-color:'+fadebgcolor+'"></div><div id="'+this.canvasbase+'_1" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);opacity:0.1;-moz-opacity:0.1;-khtml-opacity:0.1;background-color:'+fadebgcolor+'"></div></div>')
document.write('<div><img name="defaultslide'+this.slideshowid+'" src="'+this.postimages[0].src+'"></div>')

if (iebrowser&amp;&amp;dom||dom) //if IE5+ or modern browsers such as Firefox
setInterval("fadearray["+this.slideshowid+"].rotateimage()", this.delay)

function fadepic(obj){
if (obj.degree<100){
if (obj.tempobj.filters&amp;&amp;obj.tempobj.filters[0]){
if (typeof obj.tempobj.filters[0].opacity=="number") //if IE6+
else //else if IE5.5-
else if (obj.tempobj.style.MozOpacity)
else if (obj.tempobj.style.KhtmlOpacity)
else if (obj.tempobj.style.opacity&amp;&amp;!obj.tempobj.filters)
obj.nextcanvas=(obj.curcanvas==obj.canvasbase+"_0")? obj.canvasbase+"_0" : obj.canvasbase+"_1"
obj.tempobj=iebrowser? iebrowser[obj.nextcanvas] : document.getElementById(obj.nextcanvas)
obj.populateslide(obj.tempobj, obj.nextimageindex)
obj.nextimageindex=(obj.nextimageindex<obj.postimages.length-1)? obj.nextimageindex+1 : 0
setTimeout("fadearray["+obj.slideshowid+"].rotateimage()", obj.delay)

fadeshow.prototype.populateslide=function(picobj, picindex){
var slideHTML=""
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML='<a href="'+this.theimages[picindex][1]+'" target="'+this.theimages[picindex][2]+'">'
slideHTML+='<img src="'+this.postimages[picindex].src+'" border="'+this.imageborder+'px">'
if (this.theimages[picindex][1]!="") //if associated link exists for image

if (this.pausecheck==1) //if pause onMouseover enabled, cache object
var cacheobj=this
if (this.mouseovercheck==1)
setTimeout(function(){cacheobj.rotateimage()}, 100)
else if (iebrowser&amp;&amp;dom||dom){
var crossobj=this.tempobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
this.curcanvas=(this.curcanvas==this.canvasbase+"_0")? this.canvasbase+"_1" : this.canvasbase+"_0"
var ns4imgobj=document.images['defaultslide'+this.slideshowid]
this.curimageindex=(this.curimageindex<this.postimages.length-1)? this.curimageindex+1 : 0

var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
if (crossobj.filters&amp;&amp;crossobj.filters[0]){
if (typeof crossobj.filters[0].opacity=="number") //if IE6+
else //else if IE5.5-
else if (crossobj.style.MozOpacity)
else if (crossobj.style.KhtmlOpacity)
else if (crossobj.style.opacity&amp;&amp;!crossobj.filters)

var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
this.populateslide(crossobj, this.curimageindex)
var cacheobj=this
var crossobjcontainer=iebrowser? iebrowser["master"+this.slideshowid] : document.getElementById("master"+this.slideshowid)



<script type="text/javascript">
//new fadeshow(IMAGES_ARRAY_NAME, slideshow_width, slideshow_height, borderwidth, delay, pause (0=no, 1=yes), optionalRandomOrder)
new fadeshow(fadeimages, 200, 160, 0, 3000, 1)

06-17-2008, 08:06 PM
site I refer: http://www.holidayaptsaspasia.com/
template I refer belongs the side image: http://www.holidayaptsaspasia.com/Templates/main.dwt

06-18-2008, 07:45 AM
I now convert encoded-ampersands to ampersands in source and slide img work now, well where is the problem ? You say there will be no problem (with convert) ?

06-18-2008, 01:28 PM
There was a key word in my post above. Sorry that I didn't make it clearer. As I said:

In fact, all apersands in your markup should be encoded as &amp; -- even in URLs.
Edit/Delete Message

Bascially, all apersands in your HTML should be encoded. Leave all javascripts and other scripts alone.

Reviewing the Common HTML Validation Problems page (http://htmlhelp.com/tools/validator/problems.html) on the WDG website might be helpful to you.

06-23-2008, 11:06 AM
Another simple page (hence not yet implemented - beginner) the
is "This Page Is Valid XHTML 1.0 Transitional!" by http://validator.w3.org but javascript below do not work ? Please note to become valid I follow instructions to change < to &lt; in js code ?

<script language="javascript" type="text/javascript">
function timerun() {
var day="";
var month="";
var myweekday="";
var year="";
newdate = new Date();
mydate = new Date();
dston = new Date('March 29, 2009 2:59:59'); // 29 March 2009, 02:59:59
dstoff = new Date('october 26, 2008 2:59:59'); // Sunday, 26 October 2008, 03:59:59
var myzone = newdate.getTimezoneOffset();

var zone = -2; // references your time zone

if ((newdate > dston) || (newdate &lt; dstoff) ) { // &gt;
zonea = zone - 1 ;
dst = " GMT+2 Daylight Savings Time";
else {
zonea = zone ; dst = " GMT+2 Standard Time";
var newzone = (zonea*60*60*1000);
newtimea = newtime+(myzone*60*1000)-newzone;
myday = mydate.getDay();
mymonth = mydate.getMonth();
myweekday= mydate.getDate();
myyear= mydate.getYear();
year = myyear;

if (year &lt; 2000)
year = year + 1900;
myhours = mydate.getHours();
if (myhours >= 12) {
myhours = (myhours == 12) ? 12 : myhours - 12; mm = " PM";
else {
myhours = (myhours == 0) ? 12 : myhours; mm = " AM";
myminutes = mydate.getMinutes();
if (myminutes &lt; 10){
mytime = ":0" + myminutes;
else {
mytime = ":" + myminutes;
mysecs = mydate.getSeconds();
if (mysecs &lt; 10){
mys = ":0" + mysecs;
else {
mys = ":" + mysecs;
arday = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
armonth = new Array("January ","February ","March ","April ","May ","June ","July ","August ","September ", "October ","November ","December ")
ardate = new Array("0th","1st","2nd","3rd","4th","5th","6th","7th","8th","9th","10th","11th","12th","13th","14th","15th","16th","17th","18th","19th","20th","21st","22nd","23rd","24th","25th","26th","27th","28th","29th","30th","31st");
// rename locale as needed.

var time = ("In Paphos, Cyprus, it is: " + myhours + mytime + mys + mm + ", " + arday[myday] +", " + armonth[mymonth] +" "+ardate[myweekday] + ", " + year+", " + dst +".");
document.getElementById('time').innerHTML= time;


06-23-2008, 01:38 PM
The WC3 Validator does not validate/test javascript. It validates your HTML or XHTML markup.

As I said in my previous post, you do not need to encode JavaScript. Change all of your operators to the correct characters instead of using HTML entities (i.e. change &lt; back to <).

Make sure you read that page that I linked to as well.

06-23-2008, 09:34 PM
Page Is Valid XHTML 1.0 Transitional! even this validation shows(nonValid) only js code conversions to be made(not else) ?

07-02-2008, 06:37 PM
A PAGE THAT HAS js code in, and the like symbols >,<,& may be valid by anyway ? Or will be valid but the W3C VALIDATOR will not shown validity ? If I convert these symbols to entity, doc is valid, but js do NOT work ...

If i buy "cs3 premium web" from usa, it will need to buy key again from usa, or does not matter ?

07-03-2008, 11:34 AM
I was ready buy since come out version 3.3 cs3 web premium, now await trial dvd (3.3) get out to buy it ...it will need to buy key again from usa, or does not matter ?
js: code js do not validate, must be only external to get a valid doc, only and only this ?

07-08-2008, 06:21 PM
Hey, I would never use any HTML validator. All I would do is paste my scripts here on Dynamic Drive.com