PDA

View Full Version : drop-in box



ghostme
08-23-2007, 02:14 PM
1) Script Title: drop-in content box

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/dropinbox.htm

3) Describe problem: drop-in from right to left

Please how can i modify the drop-in script to be able to move from right to left.
Thank you

ghostme
08-27-2007, 04:17 PM
Please any help?

ddadmin
08-28-2007, 01:35 AM
Ok, try replacing the 3 functions "initbox()", "dropin()" and "bouncein()" with the below modified instead:


function initbox(){
if (!dom&&!ie&&!ns4)
return
crossobj=(dom)?document.getElementById("dropin").style : ie? document.all.dropin : document.dropin
scroll_left=(ie)? truebody().scrollLeft : window.pageXOffset
crossobj.left=scroll_left-parseInt(crossobj.width)+calunits
crossobj.visibility=(dom||ie)? "visible" : "show"
dropstart=setInterval("dropin()",50)
}

function dropin(){
scroll_left=(ie)? truebody().scrollLeft : window.pageXOffset
if (parseInt(crossobj.left)<200+scroll_left)
crossobj.left=parseInt(crossobj.left)+40+calunits
else{
clearInterval(dropstart)
bouncestart=setInterval("bouncein()",50)
}
}

function bouncein(){
crossobj.left=parseInt(crossobj.left)-bouncelimit+calunits
if (bouncelimit<0)
bouncelimit+=8
bouncelimit=bouncelimit*-1
if (bouncelimit==0){
clearInterval(bouncestart)
}
}

That should do it.

ghostme
08-30-2007, 02:53 PM
Hey thanks alot for the solutions