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

Thread: Anylink Validation Error - rev="lr" obsolete

  1. #1
    Join Date
    Sep 2004
    Location
    Tallahassee, FL USA
    Posts
    264
    Thanks
    71
    Thanked 2 Times in 2 Posts

    Default Anylink Validation Error - rev="lr" obsolete

    1) Script Title: Anylink JS Dropdown Menu

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...pmenuindex.htm

    3) Describe problem:

    I love this menu and it's functioning, but I would like to solve the validation error if possible. Here is the installed menu: http://www.altogetherchristmas.com/

    When I try to validate at http://html5.validator.nu/, I get the error:
    "The rev attribute on the a element is obsolete."

    I have the menu updated at another so it validates, but it reveals the items below the anchor, not to the right.

    Thanks in advance for any help in getting this to validate.
    Deborah
    Last edited by james438; 08-11-2014 at 06:43 PM. Reason: minor formatting
    Deborah Whipp
    Web Designer
    Tallahassee, FL
    www.DWWebDesigns.com

  2. #2
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,881
    Thanks
    49
    Thanked 266 Times in 258 Posts
    Blog Entries
    56

  3. #3
    Join Date
    Sep 2004
    Location
    Tallahassee, FL USA
    Posts
    264
    Thanks
    71
    Thanked 2 Times in 2 Posts

    Default

    I know, but I would like valid HTML5 coding and the rev attribute it obsolete and not a valid attribute for a tags in HTML5.
    Thanks,
    Deborah
    Deborah Whipp
    Web Designer
    Tallahassee, FL
    www.DWWebDesigns.com

  4. #4
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,881
    Thanks
    49
    Thanked 266 Times in 258 Posts
    Blog Entries
    56

  5. #5
    Join Date
    Sep 2004
    Location
    Tallahassee, FL USA
    Posts
    264
    Thanks
    71
    Thanked 2 Times in 2 Posts

    Default

    I don't use it to check HTML5 at all, it misses too much.
    Deborah Whipp
    Web Designer
    Tallahassee, FL
    www.DWWebDesigns.com

  6. #6
    Join Date
    Sep 2004
    Location
    Tallahassee, FL USA
    Posts
    264
    Thanks
    71
    Thanked 2 Times in 2 Posts

    Default

    I would really appreciate any help with this if there's anyone that knows how to update these scripts to validate with HtML5.
    Thanks,
    Deborah
    Deborah Whipp
    Web Designer
    Tallahassee, FL
    www.DWWebDesigns.com

  7. #7
    Join Date
    Mar 2010
    Location
    Florida
    Posts
    512
    Thanks
    9
    Thanked 61 Times in 59 Posts

    Default

    To fix it go to 'anylinkmenu.js'

    Replace:
    Code:
    orientation: anchorobj.getAttribute("rev")=="lr"? "lr" : "ud",
    with
    Code:
    orientation: anchorobj.getAttribute("rel")=="lr"? "lr" : "ud",
    -DW [Deadweight]
    Resolving your thread: First Post: => EDIT => Lower right: => GO ADVANCED => Top Advance Editor drop down: => PREFIX:Resolved

  8. The Following User Says Thank You to Deadweight For This Useful Post:

    dmwhipp (09-01-2014)

  9. #8
    Join Date
    Sep 2004
    Location
    Tallahassee, FL USA
    Posts
    264
    Thanks
    71
    Thanked 2 Times in 2 Posts

    Default

    It works, but now I'm getting a different error:
    "Error: Bad value lr for attribute rel on element a: The string lr is not a registered keyword."

    Here is the test page: http://www.altogetherchristmas.com/menutest.html
    Deborah Whipp
    Web Designer
    Tallahassee, FL
    www.DWWebDesigns.com

  10. #9
    Join Date
    Mar 2010
    Location
    Florida
    Posts
    512
    Thanks
    9
    Thanked 61 Times in 59 Posts

    Default

    Change it to something like this and let me know:
    html link code:
    Code:
    <a class="menuanchorclass" href="/decorating.html" id="menu3" data-rel="lr">
    Change the JS file to:
    Code:
    orientation: anchorobj.getAttribute("data-rel")=="lr"? "lr" : "ud",
    -DW [Deadweight]
    Resolving your thread: First Post: => EDIT => Lower right: => GO ADVANCED => Top Advance Editor drop down: => PREFIX:Resolved

  11. The Following User Says Thank You to Deadweight For This Useful Post:

    dmwhipp (09-01-2014)

  12. #10
    Join Date
    Dec 2008
    Location
    Portsmouth, UK
    Posts
    1,891
    Thanks
    2
    Thanked 441 Times in 435 Posts

    Default

    changes in red

    html

    Code:
    <p><a href="http://www.dynamicdrive.com" class="menuanchorclass someotherclass orientation:lr" rel="anylinkmenu2[click]">Right dropping menu</a> (click to reveal)</p>
    code

    new function

    Code:
    cls:function(o,nme){
     for (var s=o.className.split(' '),i,z0=0;z0<s.length;z0++){
      i=s[z0].indexOf(':');
      if (s[z0].slice(0,i)==nme){
       return s[z0].slice(i+1);
      }
     }
     return '?';
    },
    modified line

    Code:
    setupmenu:function(targetclass, anchorobj, pos){
    	this.standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body
    	var relattr=anchorobj.getAttribute("rel")
    	dropmenuid=relattr.replace(/\[(\w+)\]/, '')
    	var dropmenuvar=window[dropmenuid]
    	var dropmenu=this.addDiv(null, dropmenuvar.divclass, dropmenuvar.inlinestyle) //create and add main sub menu DIV
    	dropmenu.innerHTML=this.getmenuHTML(dropmenuvar)
    	var menu=this.menusmap[targetclass+pos]={
    		id: targetclass+pos,
    		anchorobj: anchorobj,
    		dropmenu: dropmenu,
    		revealtype: (relattr.length!=dropmenuid.length && RegExp.$1=="click") || anylinkmenu.ismobile ? "click" : "mouseover",
    		orientation: this.cls(anchorobj,'orientation')=="lr"? "lr" : "ud",
    		shadow: this.addDiv(null, "anylinkshadow", null) //create and add corresponding shadow
    	}
    	menu.anchorobj._internalID=targetclass+pos
    	menu.anchorobj._isanchor=true
    	menu.dropmenu._internalID=targetclass+pos
    	menu.shadow._internalID=targetclass+pos
    	menu.dropmenu.setcss=this.setcss
    	menu.shadow.setcss=this.setcss
    	menu.shadow.setcss({width: menu.dropmenu.offsetWidth+"px", height:menu.dropmenu.offsetHeight+"px"})
    	this.setopacity(menu.shadow, this.effects.shadow.opacity)
    	this.addEvent([menu.anchorobj, menu.dropmenu, menu.shadow], function(e){ //MOUSEOVER event for anchor, dropmenu, shadow
    		var menu=anylinkmenu.menusmap[this._internalID]
    		if (this._isanchor && menu.revealtype=="mouseover" && !anylinkmenu.isContained(this, e)){ //event for anchor
    			anylinkmenu.showmenu(menu.id)
    			anylinkmenu.addState(this, "add")
    		}
    		else if (typeof this._isanchor=="undefined"){ //event for drop down menu and shadow
    			clearTimeout(menu.hidetimer)
    		}
    	}, "mouseover")
    	this.addEvent([menu.anchorobj, menu.dropmenu, menu.shadow], function(e){ //MOUSEOUT event for anchor, dropmenu, shadow
    		if (!anylinkmenu.isContained(this, e)){
    			var menu=anylinkmenu.menusmap[this._internalID]
    			menu.hidetimer=setTimeout(function(){
    				anylinkmenu.addState(menu.anchorobj, "remove")
    				anylinkmenu.hidemenu(menu.id)
    			}, anylinkmenu.effects.delayhide)
    		}
    	}, "mouseout")
    	this.addEvent([menu.anchorobj, menu.dropmenu], function(e){ //CLICK event for anchor, dropmenu
    		var menu=anylinkmenu.menusmap[this._internalID]
    		if ( this._isanchor && menu.revealtype=="click"){
    			if (menu.dropmenu.style.visibility=="visible")
    				anylinkmenu.hidemenu(menu.id)
    			else{
    				anylinkmenu.addState(this, "add")
    				anylinkmenu.showmenu(menu.id)
    			}
    			if (e.preventDefault)
    				e.preventDefault()
    			return false
    		}
    		else
    			menu.hidetimer=setTimeout(function(){anylinkmenu.hidemenu(menu.id)}, anylinkmenu.effects.delayhide)
    	}, "click")
    },
    Vic
    God Loves You and will never love you less.
    http://www.vicsjavascripts.org/Home.htm
    If my post has been useful please donate to http://www.operationsmile.org.uk/

Similar Threads

  1. Replies: 7
    Last Post: 06-25-2014, 03:30 PM
  2. Error - "Anylink menu undefined"
    By themoon2 in forum JavaScript
    Replies: 3
    Last Post: 08-01-2012, 03:39 PM
  3. "AnyLink JS Drop Down Menu v2.2" Error
    By wizi in forum JavaScript
    Replies: 4
    Last Post: 05-25-2010, 09:32 PM
  4. help with validating a user. if exist "allow" else "error"
    By Hollywood in forum Looking for such a script or service
    Replies: 2
    Last Post: 01-25-2010, 08:19 AM
  5. Error in Explorer 8 with "AnyLink" Drop Down Menu
    By dawnz in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 10-20-2009, 09:02 PM

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
  •