allora...dal titolo non si capisce molto....cmq...il problema è questo...
ho trovato questo codice nel forum
codice:
<script>
function getPageCoords (element) { // thanks to 'Martin Honnen' for this function
var coords = {x: 0, y: 0};
while (element) {
coords.x += element.offsetLeft;
coords.y += element.offsetTop;
element = element.offsetParent;
}
return coords;
}
</script>
che serve a ricavare le coordinate di un oggetto in una pagina.
io dovrei ricavare le coordinate di un immagine e "inserirle" in quest'altro script
codice:
<script>
/***
This is the menu creation code - place it right after you body tag
Feel free to add this to a stand-alone js file and link it to your page.
**/
//Menu object creation
oCMenu=new makeCM("oCMenu") //Making the menu object. Argument: menuname
//Menu properties
oCMenu.pxBetween=1
oCMenu.fromLeft=5
oCMenu.fromTop=130
oCMenu.rows=0
oCMenu.menuPlacement=""
ecc.ecc.
al posto di 5 e 130 ovviamente.
il buon gemello mi aveva suggerito di usare
codice:
oCMenu.pxBetween= getPageCoords(document.immagine).x ;
oCMenu.fromLeft= getPageCoords(document.immagine).y ;
ma nn funziona.
qualcuno ha qualke consiglio da darmi???