Avatar billede kodak Mester
06. december 2005 - 16:09 Der er 1 kommentar og
1 løsning

Ændring af script

<SCRIPT language=javaScript>
<!--

menuItems = new Array();
menuItemNum = 0;

function addMenuItem(text, url, img){
  if(img) menuItems[menuItemNum] = new Array(text, url, img);
  else if(text) menuItems[menuItemNum] = new Array(text, url);
  else menuItems[menuItemNum] = new Array();
  menuItemNum++;
}

menuWidth = 230;
menuHeight = 333;
menuDelay = 50;
menuSpeed = 17;
menuOffset = 2;

addMenuItem("Tilbage","http://"); @@@@@ Her vil jeg gerne have at den henvisertil tidligereside @@@@@
addMenuItem("Fremad"); @@@@@ Her vil jeg gerne have at teksten ikke bliver makeret og have farvet teksten Grå @@@@@
addMenuItem();
addMenuItem("Gem baggrung som...","http://");
addMenuItem("Anvend som baggrund","http://");
addMenuItem("Kopier baggrund","http://");
addMenuItem("Benyt som element på skrivebordet...","http://");
addMenuItem();
addMenuItem("Maker alt","http://");
addMenuItem("Sæt ind","http://");
addMenuItem();
addMenuItem("Opret genvej","http://");
addMenuItem("Føj til Foretrukne...","http://");
addMenuItem("Vis kilde","http://");
addMenuItem();
addMenuItem("Tegnsæt","http://");
addMenuItem();
addMenuItem("Udskriv","http://");
addMenuItem("Opdater","http://");
addMenuItem();
addMenuItem("Eksporter til Microsoft Exel","http://");
addMenuItem();
addMenuItem("Egenskaber","http://");


if(window.navigator.appName == "Microsoft Internet Explorer" && window.navigator.appVersion.substring(window.navigator.appVersion.indexOf("MSIE") + 5, window.navigator.appVersion.indexOf("MSIE") + 8) >= 5.5)
  isIe = 1;
else
  isIe = 0;

if(isIe){
  menuContent = '<table id="rightMenu" width="0" height="0" cellspacing="0" cellpadding="0" style="font:menu;color:menutext;"><tr height="1"><td style="background:threedlightshadow" colspan="5"></td><td style="background:threeddarkshadow"></td></tr><tr height="1"><td style="background:threedlightshadow"></td><td style="background:threedhighlight" colspan="3"></td><td style="background:threedshadow"></td><td style="background:threeddarkshadow"></td></tr><tr height="10"><td style="background:threedlightshadow"></td><td style="background:threedhighlight"></td><td style="background:threedface"><img src="file:///C:/Documents%20and%20Settings/Blue/Dokumenter/linie.GIF" border="0"></td><td style="background:threedface"><table cellspacing="0" cellpadding="0" nowrap style="font:menu;color:menutext;cursor:default;">';
  for(m=0;m<menuItems.length;m++){
  if(menuItems[m][0] && menuItems[m][2])
    menuContent += '<tr height="17" onMouseOver="this.style.background=\'highlight\';this.style.color=\'highlighttext\';" onMouseOut="this.style.background=\'threedface\';this.style.color=\'menutext\';" onClick="parent.window.location.href=\'' + menuItems[m][1] + '\'"><td style="background:threedface" width="1" nowrap></td><td width="21" nowrap><img src="' + menuItems[m][2] + '"></td><td nowrap>' + menuItems[m][0] + '</td><td width="21" nowrap></td><td style="background:threedface" width="1" nowrap></td></tr>';
  else if(menuItems[m][0])
    menuContent += '<tr height="17" onMouseOver="this.style.background=\'highlight\';this.style.color=\'highlighttext\';" onMouseOut="this.style.background=\'threedface\';this.style.color=\'menutext\';" onClick="parent.window.location.href=\'' + menuItems[m][1] + '\'"><td style="background:threedface" width="1" nowrap></td><td width="21" nowrap></td><td nowrap>' + menuItems[m][0] + '</td><td width="21" nowrap></td><td style="background:threedface" width="1" nowrap></td></tr>';
  else
    menuContent += '<tr><td colspan="5" height="4"></td></tr><tr><td colspan="5"><table cellspacing="0"><tr><td width="2" height="1"></td><td width="0" height="1" style="background:threedshadow"></td><td width="2" height="1"></td></tr><tr><td width="2" height="1"></td><td width="100%" height="1" style="background:threedhighlight"></td><td width="2" height="1"></td></tr></table></td></tr><tr><td colspan="5" height="3"></td></tr>';
  }
  menuContent += '</table></td><td style="background:threedshadow"></td><td style="background:threeddarkshadow"></td></tr><tr height="1"><td style="background:threedlightshadow"></td><td style="background:threedhighlight"></td><td style="background:threedface" colspan="2"></td><td style="background:threedshadow"></td><td style="background:threeddarkshadow"></td></tr><tr height="1"><td style="background:threedlightshadow"></td><td style="background:threedshadow" colspan="4"></td><td style="background:threeddarkshadow"></td></tr><tr height="1"><td style="background:threeddarkshadow" colspan="6"></td></tr></table>';

  menuPopup = window.createPopup();
  menuPopup.document.body.innerHTML = menuContent;
}

function showMenu(){
  menuXPos = event.clientX + menuOffset;
  menuYPos = event.clientY + menuOffset;

  menuXIncrement = menuWidth / menuSpeed;
  menuYIncrement = menuHeight / menuSpeed;

  menuTimer = setTimeout("openMenu(0,0)", menuDelay);

  return false;
}


function openMenu(height, width){
  iHeight = height;
  iWidth = width;

  menuPopup.show(menuXPos, menuYPos, iWidth, iHeight, document.body);

  if(iHeight < menuHeight)
  menuTimer = setTimeout("openMenu(iHeight + menuYIncrement, iWidth + menuXIncrement)", 1);
  else
  clearTimeout(menuTimer);
}


if(isIe) document.oncontextmenu = showMenu;


//-->
</SCRIPT>
Avatar billede kodak Mester
06. december 2005 - 16:10 #1
Der hvor jeg har makeret en tekst med @@@@@ vil jeg gerne have rettet det den står ud for til det der står i den. @@@@@
Avatar billede kodak Mester
19. juni 2006 - 08:34 #2
når ingen hjælp.
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Vi tilbyder markedets bedste kurser inden for webudvikling

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester