Come per il mio precedente messaggio, scrivo qui anziché sul forum dedicato allo javascript perché credo che i problemi derivino non dallo script ma da Blgger. Ho preso lo script dei menu a comparsa da questo vosrtro ottimo sito (qui) e provato a usarlo su Blogger, ma manco a dirlo non funziona, addirittura non riesce a salvare il modello e mi dà l'errore:
Messaggio di errore XML: The entity name must immediately follow the '&' in the entity reference.
La parte di codice che a quanto pare non riesce a "digerire" (se la tolgo mi salva il modello) è questa, nell'head :
Proprio non riesco a capire perché su Blogger non mi funzionano certi script: bisogna imparare un linguaggio apposta per lui?codice:<script type="text/javascript"> var menuLayers = { timer: null, activeMenuID: null, offX: 4, // posizione orizziontale rispetto al cursore offY: 6, // posizione verticale rispetto al cursore show: function(id, e) { var mnu = document.getElementById? document.getElementById(id): null; if (!mnu) return; this.activeMenuID = id; if ( mnu.onmouseout == null ) mnu.onmouseout = this.mouseoutCheck; if ( mnu.onmouseover == null ) mnu.onmouseover = this.clearTimer; viewport.getAll(); this.position(mnu,e); }, hide: function() { this.clearTimer(); if (this.activeMenuID && document.getElementById) this.timer = setTimeout("document.getElementById('"+menuLayers.activeMenuID+"').style.visibility = 'hidden'", 200); }, position: function(mnu, e) { var x = e.pageX? e.pageX: e.clientX + viewport.scrollX; var y = e.pageY? e.pageY: e.clientY + viewport.scrollY; if ( x + mnu.offsetWidth + this.offX > viewport.width + viewport.scrollX ) x = x - mnu.offsetWidth - this.offX; else x = x + this.offX; if ( y + mnu.offsetHeight + this.offY > viewport.height + viewport.scrollY ) y = ( y - mnu.offsetHeight - this.offY > viewport.scrollY )? y - mnu.offsetHeight - this.offY : viewport.height + viewport.scrollY - mnu.offsetHeight; else y = y + this.offY; mnu.style.left = x + "px"; mnu.style.top = y + "px"; this.timer = setTimeout("document.getElementById('" + menuLayers.activeMenuID + "').style.visibility = 'visible'", 200); }, mouseoutCheck: function(e) { e = e? e: window.event; var mnu = document.getElementById(menuLayers.activeMenuID); var toEl = e.relatedTarget? e.relatedTarget: e.toElement; if ( mnu != toEl && !menuLayers.contained(toEl, mnu) ) menuLayers.hide(); }, contained: function(oNode, oCont) { if (!oNode) return; while ( oNode = oNode.parentNode ) if ( oNode == oCont ) return true; return false; }, clearTimer: function() { if (menuLayers.timer) clearTimeout(menuLayers.timer); } } </script>
Grazie anticipate per l'attenzione.

Rispondi quotando