PDA

View Full Version : AnyLink Dropdown Menu



Johnnymushio
07-16-2006, 05:25 PM
The page I will be referring to is japantown.awardspace.com/japantown.shtml

When I use FF in a browser resolution of 800x600, it is impossible to get the "Other" menu to drop down.

Although, in IE it drops down in 800x600, just a little off position to fit inside the screen I am guessing.

In FF and IE the "Other" menu drops down fine in a browser resolution of 1024x768.

How can I make it drop down correctly in FF in a browser resolution of 800x600?

Oh! I also noticed that if the window is too small to let the menu drop down normally, it wont drop down at all. It attempts to, but it doesn't work. Is their a way to fix this?

Johnnymushio
07-17-2006, 11:59 PM
bumpp

jscheuer1
07-18-2006, 06:00 AM
Due to the complexity and/or vagaries of your layout, the function clearbrowseredge(obj, whichedge) just doesn't seem to be working. In IE at 800X600 it makes no adjustment, in FF much too great of one in the opposite direction and in Opera, the adjustment appears about right but, inappropriate for your layout. So, I would suggest sort circuiting that function by assigning its return value to 0. Change it at the end as shown below in red:


function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
return 0
}

Johnnymushio
07-19-2006, 12:43 AM
it worked. thank you :)

Johnnymushio
11-05-2006, 01:19 AM
http://japantown.awardspace.com/japantown.shtml

ok, im changing the pages width to 765, i dont plan on changing it again..

but,, the menu is now going to be 152 pix long.

i changed it, but the gray area is still 157 pix long, i believe thats the correct number.

the highlight area and link area are 152, the correct size.

how do i get rid of that extra gray area in the menu

jscheuer1
11-05-2006, 02:37 AM
You've configured the style width to 152 (which to be effective should have units specified (added here in red):


#dropmenudiv a, span{
color: black;
width: 152px;
. . .

and the default width value in the script to 152px:


var menuwidth='152px' //default menu width

but, in your individual onmouseover calls (example):


onMouseover="dropdownmenu(this, event, menu0, '159px')"

in the area tags:


<map name="Map">
<area shape="rect" coords="1,63,152,84" href="default.htm" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menu0, '159px')" onMouseout="delayhidemenu()">
<area shape="rect" coords="154,63,305,84" href="default.htm" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menu1, '159px')" onMouseout="delayhidemenu()">
<area shape="rect" coords="307,63,458,84" href="default.htm" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menu2, '159px')" onMouseout="delayhidemenu()">
<area shape="rect" coords="460,63,611,84" href="default.htm" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menu3, '159px')" onMouseout="delayhidemenu()">
<area shape="rect" coords="613,63,764,84" href="default.htm" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menu4, '159px')" onMouseout="delayhidemenu()">
<area shape="rect" coords="50,15,265,50" href="japantown.shtml">
</map>

You've left it at 159px. I think you can use empty single quotes and it will follow the defaults. If not, setting each one to 152px should certainly get you that dimension. Example onmouseover event with empty single quotes for the width:


onMouseover="dropdownmenu(this, event, menu4, '')"

tech_support
11-05-2006, 04:18 AM
bumpp
...Huh?