Advertisement

07.02.2008 at 10:33AM PDT, ID: 23534382
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

6.4

Spry Vertical Menu Bar  Java Script

Asked by bradfordgiosa in JavaScript, Asynchronous Javascript and XML (AJAX)

Hello,

We use the Spry Menu Bar Javascript that is included with Dreamweaver for our left hand column navigation.
As you can see on our original site www.glowshiftdirect.com it works fine for the drop out menu of vehicle manufacturers.

How ever on our new monstercommerce site, http://02b479e.netsolstores.com/ there are glitches in the menu.

From what I have found out, a text box is rendered on the actual drop out menu, with the word "false" in the background of each menu.
(if you mouse over GMC and mouse over the far edge of the dropped out menu you can actualy use the scroll buttons to scroll the txt box.)

Is there a fix for this? Does any one know the Spyassets.js well enough to help me modify it or should I seek a new solution??


Thanks.Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
from sprymenubar.js
___________________
 
var Spry
if(!Spry){
Spry={}}
if(!Spry.Widget){
Spry.Widget={}}
Spry.Widget.MenuBar=function(element,opts){
this.init(element,opts)}
Spry.Widget.MenuBar.prototype.init=function(element,opts){
this.element=this.getElement(element)
this.currMenu=null
var isie=(typeof document.all !='undefined'&&typeof window.opera=='undefined'&&navigator.vendor !='KDE')
if(typeof document.getElementById=='undefined' ||(navigator.vendor=='Apple Computer, Inc.'&&typeof window.XMLHttpRequest=='undefined')||(isie&&typeof document.uniqueID=='undefined')){
return}
if(opts){
for(var k in opts){
var rollover=new Image
rollover.src=opts[k]}}
if(this.element){
this.currMenu=this.element
var items=this.element.getElementsByTagName('li')
for(var i=0;i<items.length;i++){
this.initialize(items[i],element,isie)
if(isie){
this.addClassName(items[i],"MenuBarItemIE")
items[i].style.position="static"}}
if(isie){
if(this.hasClassName(this.element,"MenuBarVertical")){
this.element.style.position="relative"}
var linkitems=this.element.getElementsByTagName('a')
for(var i=0;i<linkitems.length;i++){
linkitems[i].style.position="relative"}}}}
Spry.Widget.MenuBar.prototype.getElement=function(ele){
if(ele&&typeof ele=="string")
return document.getElementById(ele)
return ele}
Spry.Widget.MenuBar.prototype.hasClassName=function(ele,className){
if(!ele || !className || !ele.className || ele.className.search(new RegExp("\\b"+className+"\\b"))==-1){
return false}
return true}
Spry.Widget.MenuBar.prototype.addClassName=function(ele,className){
if(!ele || !className || this.hasClassName(ele,className))
return
ele.className+=(ele.className ? " " : "")+className}
Spry.Widget.MenuBar.prototype.removeClassName=function(ele,className){
if(!ele || !className || !this.hasClassName(ele,className))
return
ele.className=ele.className.replace(new RegExp("\\s*\\b"+className+"\\b","g"),"")}
Spry.Widget.MenuBar.prototype.addEventListener=function(element,eventType,handler,capture){
try{
if(element.addEventListener){
element.addEventListener(eventType,handler,capture)}
else if(element.attachEvent){
element.attachEvent('on'+eventType,handler)}}
catch(e){}}
Spry.Widget.MenuBar.prototype.createIframeLayer=function(menu){
var layer=document.createElement('iframe')
layer.tabIndex='-1'
layer.src='javascript:false;'
menu.parentNode.appendChild(layer)
layer.style.left=menu.offsetLeft+'px'
layer.style.top=menu.offsetTop+'px'
layer.style.width=menu.offsetWidth+'px'
layer.style.height=menu.offsetHeight+'px'}
Spry.Widget.MenuBar.prototype.removeIframeLayer=function(menu){
var layers=menu.parentNode.getElementsByTagName('iframe')
while(layers.length>0){
layers[0].parentNode.removeChild(layers[0])}}
Spry.Widget.MenuBar.prototype.clearMenus=function(root){
var menus=root.getElementsByTagName('ul')
for(var i=0;i<menus.length;i++){
this.hideSubmenu(menus[i])}
this.removeClassName(this.element,"MenuBarActive")}
Spry.Widget.MenuBar.prototype.bubbledTextEvent=function(){
return(navigator.vendor=='Apple Computer, Inc.'&&(event.target==event.relatedTarget.parentNode ||(event.eventPhase==3&&event.target.parentNode==event.relatedTarget)))}
Spry.Widget.MenuBar.prototype.showSubmenu=function(menu){
if(this.currMenu){
this.clearMenus(this.currMenu)
this.currMenu=null}
if(menu){
this.addClassName(menu,"MenuBarSubmenuVisible")
if(typeof document.all !='undefined'&&typeof window.opera=='undefined'&&navigator.vendor !='KDE'){
if(!this.hasClassName(this.element,"MenuBarHorizontal")|| menu.parentNode.parentNode !=this.element){
menu.style.top=menu.parentNode.offsetTop+'px'}}
if(typeof document.uniqueID !="undefined"){
this.createIframeLayer(menu)}}
this.addClassName(this.element,"MenuBarActive")}
Spry.Widget.MenuBar.prototype.hideSubmenu=function(menu){
if(menu){
this.removeClassName(menu,"MenuBarSubmenuVisible")
if(typeof document.all !='undefined'&&typeof window.opera=='undefined'&&navigator.vendor !='KDE'){
menu.style.top=''
menu.style.left=''}
this.removeIframeLayer(menu)}}
Spry.Widget.MenuBar.prototype.initialize=function(listitem,element,isie){
var opentime,closetime
var link=listitem.getElementsByTagName('a')[0]
var submenus=listitem.getElementsByTagName('ul')
var menu=(submenus.length>0 ? submenus[0] : null)
var hasSubMenu=false
if(menu){
this.addClassName(link,"MenuBarItemSubmenu")
hasSubMenu=true}
if(!isie){
listitem.contains=function(testNode){
if(testNode==null){
return false}
if(testNode==this){
return true}
else{
return this.contains(testNode.parentNode)}}}
var self=this
this.addEventListener(listitem,'mouseover',function(e){
if(self.bubbledTextEvent()){
return}
clearTimeout(closetime)
if(self.currMenu==listitem){
self.currMenu=null}
self.addClassName(link,hasSubMenu ? "MenuBarItemSubmenuHover" : "MenuBarItemHover")
if(menu&&!self.hasClassName(menu,"MenuBarSubmenuVisible")){
opentime=window.setTimeout(function(){self.showSubmenu(menu);},250)}
},false)
this.addEventListener(listitem,'mouseout',function(e){
if(self.bubbledTextEvent()){
return}
var related=(typeof e.relatedTarget !='undefined' ? e.relatedTarget : e.toElement)
if(!listitem.contains(related)){
clearTimeout(opentime)
self.currMenu=listitem
self.removeClassName(link,hasSubMenu ? "MenuBarItemSubmenuHover" : "MenuBarItemHover")
if(menu){
closetime=window.setTimeout(function(){self.hideSubmenu(menu);},600)}}
})}
[+][-]07.09.2008 at 06:54PM PDT, ID: 21969823

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: JavaScript, Asynchronous Javascript and XML (AJAX)
Sign Up Now!
Solution Provided By: bradfordgiosa
Participating Experts: 0
Solution Grade: A
 
 
 
Loading Advertisement...
20081112-EE-VQP-44 / EE_QW_EXPERT_20070906