Page 1 of 2 12 LastLast
Results 1 to 10 of 14

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

  1. #1
    Join Date
    Oct 2004
    Posts
    425
    Thanks
    4
    Thanked 1 Time in 1 Post

    Default I find errors/bugs I do NOT know how to correct - validator.w3.org ?

    debugging
    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

  2. #2
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    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.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  3. #3
    Join Date
    Oct 2004
    Posts
    425
    Thanks
    4
    Thanked 1 Time in 1 Post

    Default

    Is it wrong, to replace all ampersands with encoded-ampersands in code view dw cs3 ? I mean ALL ...

  4. #4
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    Quote Originally Posted by leonidassavvides View Post
    Is it wrong, to replace all ampersands with encoded-ampersands in code view dw cs3 ? I mean ALL ...
    No...
    In fact, all apersands in your markup should be encoded as &amp; -- even in URLs.

  5. #5
    Join Date
    Oct 2004
    Posts
    425
    Thanks
    4
    Thanked 1 Time in 1 Post

    Default

    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/dynamici...nslideshow.htm
    head
    Code:
    <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.pausecheck=pause
    this.mouseovercheck=0
    this.delay=delay
    this.degree=10 //initial opacity degree (10%)
    this.curimageindex=0
    this.nextimageindex=1
    fadearray[fadearray.length]=this
    this.slideshowid=fadearray.length-1
    this.canvasbase="canvas"+this.slideshowid
    this.curcanvas=this.canvasbase+"_0"
    if (typeof displayorder!="undefined")
    theimages.sort(function() {return 0.5 - Math.random();}) //thanks to Mike (aka Mwinter) :)
    this.theimages=theimages
    this.imageborder=parseInt(borderwidth)
    this.postimages=new Array() //preload images
    for (p=0;p<theimages.length;p++){
    this.postimages[p]=new Image()
    this.postimages[p].src=theimages[p][0]
    }
     
    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>')
    else
    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
    this.startit()
    else{
    this.curimageindex++
    setInterval("fadearray["+this.slideshowid+"].rotateimage()", this.delay)
    }
    }
    
    function fadepic(obj){
    if (obj.degree<100){
    obj.degree+=10
    if (obj.tempobj.filters&amp;&amp;obj.tempobj.filters[0]){
    if (typeof obj.tempobj.filters[0].opacity=="number") //if IE6+
    obj.tempobj.filters[0].opacity=obj.degree
    else //else if IE5.5-
    obj.tempobj.style.filter="alpha(opacity="+obj.degree+")"
    }
    else if (obj.tempobj.style.MozOpacity)
    obj.tempobj.style.MozOpacity=obj.degree/101
    else if (obj.tempobj.style.KhtmlOpacity)
    obj.tempobj.style.KhtmlOpacity=obj.degree/100
    else if (obj.tempobj.style.opacity&amp;&amp;!obj.tempobj.filters)
    obj.tempobj.style.opacity=obj.degree/101
    }
    else{
    clearInterval(fadeclear[obj.slideshowid])
    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
    slideHTML+='</a>'
    picobj.innerHTML=slideHTML
    }
     
     
    fadeshow.prototype.rotateimage=function(){
    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){
    this.resetit()
    var crossobj=this.tempobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
    crossobj.style.zIndex++
    fadeclear[this.slideshowid]=setInterval("fadepic(fadearray["+this.slideshowid+"])",50)
    this.curcanvas=(this.curcanvas==this.canvasbase+"_0")? this.canvasbase+"_1" : this.canvasbase+"_0"
    }
    else{
    var ns4imgobj=document.images['defaultslide'+this.slideshowid]
    ns4imgobj.src=this.postimages[this.curimageindex].src
    }
    this.curimageindex=(this.curimageindex<this.postimages.length-1)? this.curimageindex+1 : 0
    }
     
    fadeshow.prototype.resetit=function(){
    this.degree=10
    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+
    crossobj.filters(0).opacity=this.degree
    else //else if IE5.5-
    crossobj.style.filter="alpha(opacity="+this.degree+")"
    }
    else if (crossobj.style.MozOpacity)
    crossobj.style.MozOpacity=this.degree/101
    else if (crossobj.style.KhtmlOpacity)
    crossobj.style.KhtmlOpacity=this.degree/100
    else if (crossobj.style.opacity&amp;&amp;!crossobj.filters)
    crossobj.style.opacity=this.degree/101
    }
     
     
    fadeshow.prototype.startit=function(){
    var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
    this.populateslide(crossobj, this.curimageindex)
    if (this.pausecheck==1){ //IF SLIDESHOW SHOULD PAUSE ONMOUSEOVER
    var cacheobj=this
    var crossobjcontainer=iebrowser? iebrowser["master"+this.slideshowid] : document.getElementById("master"+this.slideshowid)
    crossobjcontainer.onmouseover=function(){cacheobj.mouseovercheck=1}
    crossobjcontainer.onmouseout=function(){cacheobj.mouseovercheck=0}
    }
    this.rotateimage()
    }
    
    </script>
    body
    Code:
    <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)
        </script>

  6. #6
    Join Date
    Oct 2004
    Posts
    425
    Thanks
    4
    Thanked 1 Time in 1 Post

    Default

    site I refer: http://www.holidayaptsaspasia.com/
    template I refer belongs the side image: http://www.holidayaptsaspasia.com/Templates/main.dwt

  7. #7
    Join Date
    Oct 2004
    Posts
    425
    Thanks
    4
    Thanked 1 Time in 1 Post

    Default

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

  8. #8
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    There was a key word in my post above. Sorry that I didn't make it clearer. As I said:

    No...
    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 on the WDG website might be helpful to you.
    Last edited by Medyman; 06-23-2008 at 01:35 PM.

  9. #9
    Join Date
    Oct 2004
    Posts
    425
    Thanks
    4
    Thanked 1 Time in 1 Post

    Default

    Another simple page (hence not yet implemented - beginner) the
    http://www.poliscarhire.com/
    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 ?

    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();
    newtime=newdate.getTime();
    
    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;
    mydate.setTime(newtimea);
    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;
    
    }
    </script>

  10. #10
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •