1) Script Title: Pop-It Menu
2) Script URL (on DD): http://dynamicdrive.com/dynamicindex1/popit.htm
3) Describe problem: Im using this script, and at first it worked flawlessly (i tested it becuase im mixing it with another menu script) But after i finished everything i needed to be done, It stopped working! I cant figure out whats wrong, the script looks fine, everything is closed... i dont get it!
This is the header part -
And the blank linksets i just added as a test to see if they had to be there because i just didnt make linksets for things that werent in use yet.Code:<style type="text/css"> #popitmenu{ position: absolute; background-color: white; border:1px solid black; font: normal 12px Verdana; line-height: 18px; z-index: 100; visibility: hidden; } #popitmenu a{ text-decoration: none; padding-left: 6px; color: black; display: block; } #popitmenu a:hover{ /*hover background color*/ background-color: #CCFF9D; } </style> <script type="text/javascript"> /*********************************************** * Pop-it menu- © Dynamic Drive (www.dynamicdrive.com) * This notice MUST stay intact for legal use * Visit http://www.dynamicdrive.com/ for full source code ***********************************************/ var defaultMenuWidth="150px" //set default menu width. var linkset=new Array() //SPECIFY MENU SETS AND THEIR LINKS. FOLLOW SYNTAX LAID OUT linkset[0]='<a href="https://iaem-canada.sslpowered.com/html/members/files/IAEM%20Canada%20Minutes%20April%202009.pdf">April 2009 Minutes</a>' linkset[0]+='<a href="https://iaem-canada.sslpowered.com/html/members/files/IAEM%20Canada%20Minutes%20December%2011%20%202008%20final.pdf">December 11 2008 Minutes</a>' linkset[0]+='<a href="https://iaem-canada.sslpowered.com/html/members/files/IAEM%20Canada%20Minutes%20Jan%2015%202009.pdf">January 15 2009 Minutes</a>' linkset[0]+='<a href="https://iaem-canada.sslpowered.com/html/members/files/IAEM%20Canada%20Minutes%20November%2013%202008.pdf">November 13 2008 Minutes</a>' linkset[0]+='<a href="https://iaem-canada.sslpowered.com/html/members/files/Minutes%20August%20212008.pdf">August 21 2008 Minutes</a>' linkset[0]+='<a href="https://iaem-canada.sslpowered.com/html/members/files/Minutes%20IAEM%20February%2019%202009.pdf">February 19 2009 Minutes</a>' linkset[0]+='<a href="https://iaem-canada.sslpowered.com/html/members/files/Minutes%20IAEM%20June%2018-09.pdf">June 18 2009 Minutes</a>' linkset[0]+='<a href="https://iaem-canada.sslpowered.com/html/members/files/Minutes%20IAEM%20March%2019%202009.pdf">March 19 2009 Minutes</a>' linkset[0]+='<a href="https://iaem-canada.sslpowered.com/html/members/files/Minutes%20IAEM%20May%2021-09%20revised.pdf">May 21 2009 Minutes</a>' linkset[0]+='<a href="https://iaem-canada.sslpowered.com/html/members/files/Board%20of%20Directors%20meeting%20minutes%20Feb%204%202009.doc">BoD Minutes Feb 4 2009</a>' linkset[0]+='<a href="https://iaem-canada.sslpowered.com/html/members/files/Board%20of%20Directors%20meeting%20minutes%20Jan%207%202009.doc">BoD Minutes January 7 2009</a>' linkset[0]+='<a href="https://iaem-canada.sslpowered.com/html/members/files/IAEM%20Canada%20Board%20of%20Directors%20July%203%202008.doc">BoD Minutes July 3 2008</a>' linkset[0]+='<a href="https://iaem-canada.sslpowered.com/html/members/files/IAEM%20Canada%20Board%20of%20Directors%20May%208%202008.doc">BoD Minutes May 8 2008</a>' linkset[0]+='<a href="https://iaem-canada.sslpowered.com/html/members/files/IAEM%20Canada%20Board%20of%20Directors%20Teleconf%20April%208%202008.doc">BoD Teleconf April 8 2008</a>' linkset[0]+='<a href="https://iaem-canada.sslpowered.com/html/members/files/IAEM%20Canada%20Board%20of%20Directors%20Teleconf%20August%2019%202008.doc">BoD Teleconf August 19 2008</a>' linkset[0]+='<a href="https://iaem-canada.sslpowered.com/html/members/files/IAEM%20Canada%20Board%20of%20Directors%20Teleconf%20Dec%203%202008.doc">BoD Minutes Teleconf December 3 2008</a>' linkset[0]+='<a href="https://iaem-canada.sslpowered.com/html/members/files/IAEM%20Presentation%20Mar%2020%2008.ppt">IAEM Presentation March 20 2008</a>' linkset[0]+='<a href="https://iaem-canada.sslpowered.com/html/members/files/IAEM%20Canada%20BOARD%20Report%202008%5B1%5D.ppt">Board Report 2008</a>' linkset[0]+='<a href="https://iaem-canada.sslpowered.com/html/members/files/IAEM-Canada_StrategicPlan-November20071.pdf">IAEM Canada Strategic Plan 2007</a>' linkset[1]='<a href="https://iaem-canada.sslpowered.com/html/members/files/Member's%20Professional%20Development%20and%20Continuing%20Education%20Record.pdf">Members Professional Development And Continuing Education Record</a>' linkset[1]+='<a href="https://iaem-canada.sslpowered.com/html/members/files/Minutes%20IAEM%20May%2021-09%20revised1.doc">May 21 2009 Minutes</a>' linkset[1]+='<a href="https://iaem-canada.sslpowered.com/html/members/files/Minutes%20IAEM%20June%2018-09.doc">June 18 2009 Minutes</a>' linkset[2]='<a href=""></a>' linkset[3]='<a href=""></a>' linkset[4]='<a href=""></a>' linkset[5]='<a href=""></a>' linkset[6]='<a href=""></a>' linkset[7]='<a href=""></a>' linkset[8]='<a href=""></a>' linkset[9]='<a href=""></a>' linkset[10]='<a href=""></a>' linkset[11]='<a href="https://iaem-canada.sslpowered.com/html/members/files/IAEM%20Canada%20AGM%20minutes%20June%2017,%202008.doc">AGM Minutes June 17 2008</a>' linkset[12]='<a href=""></a>' linkset[13]='<a href="https://iaem-canada.sslpowered.com/html/members/files/FEMA%20EMI%20ISP%20for%20all.pdf">FEMA EMI ISP</a>' linkset[14]='<a href=""></a>' ////No need to edit beyond here var ie5=document.all && !window.opera var ns6=document.getElementById if (ie5||ns6) document.write('<div id="popitmenu" onMouseover="clearhidemenu();" onMouseout="dynamichide(event)"></div>') function iecompattest(){ return (document.compatMode && document.compatMode.indexOf("CSS")!=-1)? document.documentElement : document.body } function showmenu(e, which, optWidth){ if (!document.all&&!document.getElementById) return clearhidemenu() menuobj=ie5? document.all.popitmenu : document.getElementById("popitmenu") menuobj.innerHTML=which menuobj.style.width=(typeof optWidth!="undefined")? optWidth : defaultMenuWidth menuobj.contentwidth=menuobj.offsetWidth menuobj.contentheight=menuobj.offsetHeight eventX=ie5? event.clientX : e.clientX eventY=ie5? event.clientY : e.clientY //Find out how close the mouse is to the corner of the window var rightedge=ie5? iecompattest().clientWidth-eventX : window.innerWidth-eventX var bottomedge=ie5? iecompattest().clientHeight-eventY : window.innerHeight-eventY //if the horizontal distance isn't enough to accomodate the width of the context menu if (rightedge<menuobj.contentwidth) //move the horizontal position of the menu to the left by it's width menuobj.style.left=ie5? iecompattest().scrollLeft+eventX-menuobj.contentwidth+"px" : window.pageXOffset+eventX-menuobj.contentwidth+"px" else //position the horizontal position of the menu where the mouse was clicked menuobj.style.left=ie5? iecompattest().scrollLeft+eventX+"px" : window.pageXOffset+eventX+"px" //same concept with the vertical position if (bottomedge<menuobj.contentheight) menuobj.style.top=ie5? iecompattest().scrollTop+eventY-menuobj.contentheight+"px" : window.pageYOffset+eventY-menuobj.contentheight+"px" else menuobj.style.top=ie5? iecompattest().scrollTop+event.clientY+"px" : window.pageYOffset+eventY+"px" menuobj.style.visibility="visible" return false } function contains_ns6(a, b) { //Determines if 1 element in contained in another- by Brainjar.com while (b.parentNode) if ((b = b.parentNode) == a) return true; return false; } function hidemenu(){ if (window.menuobj) menuobj.style.visibility="hidden" } function dynamichide(e){ if (ie5&&!menuobj.contains(e.toElement)) hidemenu() else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget)) hidemenu() } function delayhidemenu(){ delayhide=setTimeout("hidemenu()",500) } function clearhidemenu(){ if (window.delayhide) clearTimeout(delayhide) } if (ie5||ns6) document.onclick=hidemenu </script>
and heres the actual menu code -
(new post, because this was too long)
http://www.dynamicdrive.com/forums/s...731#post202731



Reply With Quote
Bookmarks