PDA

View Full Version : Pop-it menu not working for me



TheCoffeeLady
05-02-2011, 07:21 AM
1) Script Title: :: Pop-it menu

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/popit.htm

3) Describe problem: One minute it worked and the next it didn't

:eek: :confused:
<style type="text/css">

#popitmenu{
position: absolute;
background-IMAGE: url(http://homecoffeeservice.com/images/coffeebeans1.jpg);
border:1px solid black;
font: normal 12px Verdana;
line-height: 20px;
z-index: 100;
visibility: hidden;
}

#popitmenu a{
text-decoration: none;
padding-left: 6px;
color: gold;
display: block;
}

#popitmenu a:hover{ /*hover background color*/
background-color: darkred;
}

#popitmenu a{
color:white;
}
</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="http://homecoffeeservice.com/8oclock.php">8 Oclock</a>'
linkset[0]+='<a href="http://homecoffeeservice.com/berardis.php">Berardis Flavored</a>‘
linkset[0]+='<a href="http://homecoffeeservice.com/folgers-ground-coffee.php">Folgers Ground Coffee</a>‘
linkset[0]+='<a href="http://homecoffeeservice.com/berardis.php">Heritage Flavored</a>‘
linkset[0]+='<a href="http://homecoffeeservice.com/hillsbros.php">Hills Brothers/MJB</a>‘
linkset[0]+='<a href="http://homecoffeeservice.com/generalfoods.php">Maxwell House</a>‘
linkset[0]+='<a href="http://homecoffeeservice.com/generalfoods.php">Sanka</a>‘
linkset[0]+='<a href="http://homecoffeeservice.com/generalfoods.php">Yuban</a>‘
linkset[0]+='<a href="http://homecoffeeservice.com/mjb-coffee.php">MJB</a>‘
linkset[0]+='<a href="http://homecoffeeservice.com/millstone-coffee.php">Millstone</a>‘
linkset[0]+='<a href="http://homecoffeeservice.com/ice-coffee.php">Ice Coffee</a>‘
linkset[0]+='<a href="http://homecoffeeservice.com/coffeeproducts.php">Liquid Coffee Concentrate</a>‘
linkset[0]+='<a href="http://homecoffeeservice.com/hillsbros.php">Hills Brothers</a>‘

linkset[1]='<a href="http://homecoffeeservice.com/superior.php">Superior Cappuccino</a>'
linkset[1]+='<a href="http://homecoffeeservice.com/superior.php">Hills Bros Cappuccino</a></div>
linkset[1]+='<a href="http://homecoffeeservice.com/general-foods-international-coffee.php">General Food InternationalCappuccino</a>‘
linkset[1]+='<a href="http://homecoffeeservice.com/superior.php">Superior Cappuccino</a>‘

linkset[2]='<a href="http://homecoffeeservice.com/lipton-tea.php">Lipton Tea</a>'
linkset[2]+='<a href="http://homecoffeeservice.com/bigelowtea.php">Bigelow Tea</a>‘
linkset[2]+='<a href="http://homecoffeeservice.com/chai-tea.php">Chai Tea</a>‘
linkset[2]+='<a href="http://homecoffeeservice.com/fruit-tea.php">Fruit Geen Tea</a>‘
linkset[2]+='<a href="http://homecoffeeservice.com/tetleytea.php">Tetley Tea</a>‘
linkset[2]+='<a href="http://homecoffeeservice.com/green-tea.php">Ice Green Tea</a>‘
linkset[2]+='<a href="http://homecoffeeservice.com/crystal-light.php">Crystal Light On The Go </a>‘

linkset[3]='<a href="http://homecoffeeservice.com/coffeeflavoredspoons.php">Chocolate Covered Coffee Flavored Spoons</a>'
linkset[3]+='<a href="http://homecoffeeservice.com/coffee-flavored-sweets.php">Coffee Flavored Chocolates-Pocket Coffee</a>‘
linkset[3]+='<a href="http://homecoffeeservice.com/chocolate-covered-espresso-beans.php">Chocolate Covered Espresso Beans</a>‘

linkset[4]='<a href="http://homecoffeeservice.com/stok-coffee-shots.php">Stok Black Coffee </a>'
linkset[4]+='<a href="http://homecoffeeservice.com/international-delight-liquid-creamers.php">International Delight Liquid</a>‘
linkset[4]+='<a href="http://homecoffeeservice.com/just-like-sugar.php">Just Like Sugar</a>‘
linkset[4]+='<a href="http://homecoffeeservice.com/creamsugarstirrers.php">Equal, Sweet n Low, SPLENDA</a>‘
linkset[4]+='<a href="http://homecoffeeservice.com/creamsugarstirrers.php">Sugasr Packets and Caniters</a>‘
linkset[4]+='<a href="http://homecoffeeservice.com/creamsugarstirrers.php">Coffee Pot Clearner</a>‘

linkset[5]='<a href="http://homecoffeeservice.com/torani.php">Toraini</a>'
linkset[5]+='<a href="http://homecoffeeservice.com/davinci.php">Davinci</a>‘

linkset[6]='<a href="http://homecoffeeservice.com/homecoffeemachines.php">Home Coffee Machines</a>‘
linkset[6]+='<a href="http://homecoffeeservice.com/fivestar.php">Home Espresso System</a>‘
linkset[6]+='<a href="http://homecoffeeservice.com/coffeemachines.php">One Cup Coffee Makers </a>‘
linkset[6]+='<a href="http://homecoffeeservice.com/commercialmachines.php">Office & Commercial Machines</a>‘

linkset[7]='<a href="http://homecoffeeservice.com/catalog.php">Gift Cards & More</a>'
linkset[7]+='<a href="http://homecoffeeservice.com/catalog.php">Gift Certificates</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>

<p><span style=" font-family: ; font-size: 50px; font-style: italic; font-weight: bolder; " ></span><span style=" color: #FFFFFF; font-family: ; font-size: 10px; " >THESE LINKS ARE NOT WORKING AT THIS TIME PLEASE USE OUR SHOPPING LINK AT THE TOP, THANK YOU</span>
</p>
<a href="#" onMouseover="showmenu(event,linkset[0])" onMouseout="delayhidemenu()">Coffee Products</a>&nbsp;&nbsp;&nbsp;&nbsp;<br><br>
<a href="#" onMouseover="showmenu(event,linkset[1])" onMouseout="delayhidemenu()">Cappuccino Products</a>&nbsp;&nbsp;&nbsp;&nbsp;<br><br>
<a href="#" onMouseover="showmenu(event,linkset[2])" onMouseout="delayhidemenu()">Tea Products</a>&nbsp;&nbsp;&nbsp;&nbsp;<br><br>
<a href="#" onMouseover="showmenu(event,linkset[3])" onMouseout="delayhidemenu()">Sweets Products</a>&nbsp;&nbsp;&nbsp;&nbsp;<br><br>
<a href="#" onMouseover="showmenu(event,linkset[4])" onMouseout="delayhidemenu()">Cream and Sugar</a>&nbsp;&nbsp;&nbsp;&nbsp;<br><br>
<a href="#" onMouseover="showmenu(event,linkset[5])" onMouseout="delayhidemenu()">Sugar Free Syrups</a>&nbsp;&nbsp;&nbsp;&nbsp;<br><br>
<a href="#" onMouseover="showmenu(event,linkset[6])" onMouseout="delayhidemenu()">Coffee Machine</a>&nbsp;&nbsp;&nbsp;&nbsp;<br><br>
<a href="#" onMouseover="showmenu(event,linkset[7])" onMouseout="delayhidemenu()">Gift Cards & Certificates</a><br><br><br><br>

I am trying to get it to work here http://HomeCoffeeService.com (http://HomeCoffeeService.com) down middle ways the page, left side.

One minute it was working and the next it wasn't. Now when I hover over the word (EX:Coffee) it gives me http://HomeCoffeeService.com#

I am new to this so please do not be to hard on me.

I put the ICODE in <? Include ("menu-head-script.php"); ?> in the header and put the Icode in <? Include ("lftNavigation.php"); ?> and it worked and then it stopped working.:confused:

I have 360 pages I would love to use this with.

Thanks so much