Salve, spero che questa sia la sezione giusta.
Mi diletto ormai da tempo nella compilazione di siti web da autodidatta, tuttavia non mi reputo affatto un esperto, piuttosto un dilettante.
Tempo fa ho implementato un menu in javascript su alcuni siti che gestisco, il menu è di quei tipi "preconfezionati" provvisti dei file Js: exmplmenu_var.js e menu_com.js.
Con il seguente codice:
... <td width="487" align="right" valign="bottom"><script type='text/javascript'>
function Go(){return}
</script>
<script type='text/javascript' src='menu-jav/exmplmenu_var.js'></script> <script type='text/javascript' src='menu-jav/menu_com.js'></script> <noscript><font face=Arial size=2 color="#7E7E7E">Il tuo browser non supporta questo script java</font></noscript></td>
</tr>
<tr>
<td width="150" valign="top" background="index/bg-intest-sin.gif"></td> ...
inserito tra <body> e </body> ho richiamato il menu nella pagina web in html.
Poi ho modificato le variabili a mio piacimento nel file "exmplmenu_var.js" in questo modo:
var NoOffFirstLineMenus=1; // Number of first level items
var LowBgColor='white'; // Background color when mouse is not over
var LowSubBgColor='white'; // Background color when mouse is not over on subs
var HighBgColor='white'; // Background color when mouse is over
var HighSubBgColor='white'; // Background color when mouse is over on subs
var FontLowColor='black'; // Font color when mouse is not over
var FontSubLowColor='black'; // Font color subs when mouse is not over
var FontHighColor='white'; // Font color when mouse is over
var FontSubHighColor='white'; // Font color subs when mouse is over
var BorderColor='black'; // Border color
var BorderSubColor='black'; // Border color for subs
var BorderWidth=0; // Border width
var BorderBtwnElmnts=0; // Border between elements 1 or 0
var FontFamily="arial" // Font family menu items
var FontSize=9; // Font size menu items
var FontBold=1; // Bold menu items 1 or 0
var FontItalic=0; // Italic menu items 1 or 0
var MenuTextCentered='left'; // Item text position 'left', 'center' or 'right'
var MenuCentered='right'; // Menu horizontal position 'left', 'center' or 'right'
var MenuVerticalCentered='static'; // Menu vertical position 'top', 'middle','bottom' or static
var ChildOverlap=.2; // horizontal overlap child/ parent
var ChildVerticalOverlap=.2; // vertical overlap child/ parent
var StartTop=79; // Menu offset x coordinate
var StartLeft=10; // Menu offset y coordinate
var VerCorrect=0; // Multiple frames y correction
var HorCorrect=0; // Multiple frames x correction
var LeftPaddng=1; // Left padding
var TopPaddng=2; // Top padding
var FirstLineHorizontal=1; // SET TO 1 FOR HORIZONTAL MENU, 0 FOR VERTICAL
var MenuFramesVertical=1; // Frames in cols or rows 1 or 0
var DissapearDelay=1000; // delay before menu folds in
var TakeOverBgColor=1; // Menu frame takes over background color subitem frame
var FirstLineFrame='navig'; // Frame where first level appears
var SecLineFrame='space'; // Frame where sub levels appear
var DocTargetFrame='space'; // Frame where target documents appear
var TargetLoc=''; // span id for relative positioning
var HideTop=0; // Hide first level when loading new document 1 or 0
var MenuWrap=1; // enables/ disables menu wrap 1 or 0
var RightToLeft=0; // enables/ disables right to left unfold 1 or 0
var UnfoldsOnClick=0; // Level 1 unfolds onclick/ onmouseover
var WebMasterCheck=0; // menu tree checking on or off 1 or 0
var ShowArrow=1; // Uses arrow gifs when 1
var KeepHilite=1; // Keep selected path highligthed
var Arrws=['menu-jav/tri.gif',5,10,'menu-jav/tridown.gif',10,5,'menu-jav/trileft.gif',5,10]; // Arrow source, width and height
function BeforeStart(){return}
function AfterBuild(){return}
function BeforeFirstOpen(){return}
function AfterCloseAll(){return}
// Menu tree
// MenuX=new Array(Text to show, Link, background image (optional), number of sub elements, height, width);
// For rollover images set "Text to show" to: "rollover:Image1.jpg:Image2.jpg"
Menu1=new Array("rollover:menu-jav/altro-1.gif:menu-jav/altro-2.gif","","",9,25,150);
Menu1_1=new Array("","","",0,18,150);
Menu1_2=new Array("rollover:menu-jav/foto-1.gif:menu-jav/foto-2.gif", ....
In questo modo il menu ha sempre funzionato così come volevo e in particolare la sua posizione all'interno della pagina web è sempre stata in alto a destra dello schermo, così come avevo previsto. Tuttavia, da un po' di tempo attraverso IE9, Chrome o Safari, il menu appare in basso a sinistra dello schermo ed è impossibile usarlo poiche' il ramo che si apre non è visibile (va fuori schermo).
Ebbene, ho provato a cambiare le variabili relative alla posizione in "exmplmenu_var.js" ma nulla è cambiato, ho provato ad inserire il menu in un DIV con relative caratteristiche di posizione e richiamando il DIV nella variabile TargetLoc, ma niente!
Qualcuno potrebbe aiutarmi a risolvere il problema?
Grazie mille.

Rispondi quotando