allora...dal titolo non si capisce molto....cmq...il problema è questo...
ho trovato questo codice nel forum
che serve a ricavare le coordinate di un oggetto in una pagina.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>
io dovrei ricavare le coordinate di un immagine e "inserirle" in quest'altro script
al posto di 5 e 130 ovviamente.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.
il buon gemello mi aveva suggerito di usare
ma nn funziona.codice:oCMenu.pxBetween= getPageCoords(document.immagine).x ; oCMenu.fromLeft= getPageCoords(document.immagine).y ;
qualcuno ha qualke consiglio da darmi???

Rispondi quotando