PDA

View Full Version : Anylink Browser Edge Issue



bfisher
08-28-2006, 10:45 PM
Script: AnyLink Drop Down Menu
http://www.dynamicdrive.com/dynamicindex1/dropmenuindex.htm

I have a question for you all. I apparently have a user still running their screen at 640 x 480 and they're making some noise. When they try to use the AnyLink menu, the script tries to clear the bottom of the browser window, but in doing so, the menu is moved out of the viewport to the top. Is there any way that I can edit the script to eliminate this problem? Thanks in advance.

jscheuer1
08-29-2006, 04:13 AM
Get rid of the red parts:


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 edgeoffset
}

bfisher
08-29-2006, 11:58 AM
That did it. John, thanks for the speedy replies. You've helped me out on several occasions and the solution is always right the first time out of the gate. Thanks a lot. :D