jens25e: intern gehts, extern nicht

Beitrag lesen

Hier das komplette Script (in Häppchen, weil sonst zuviel). Es handelt sich um ein Aufklappmenü (ohne Grafiken)..ausser Firmenlogo und eine Linie..

Versteh nicht, wieso das Script an daran Schuld ist, das es intern geht aber von extern aus nicht.

<html>
<head>

<script language="javascript">
var win= null;
function NewWindow(mypage,myname,w,h,scroll) {
 var winl = (screen.width-w)/2;
 var wint = (screen.height-h)/2;
 var settings ='height='+h+',';
 settings +='width='+w+',';
 settings +='top='+wint+',';
 settings +='left='+winl+',';
 settings +='scrollbars='+scroll+',';
 settings +='resizable=no';

win=window.open(mypage,myname,settings);
 return win;
}

var theMenu = new Array;
var mainMenuH = new Array; // height of menu
var theTipH = new Array; // height of description item

function layerSetup(id) {
 theObj = document.getElementById(id);
 return theObj;
}

function getHeight(id) {
 theHeight = layerSetup(id).offsetHeight;
 return theHeight;
}

function showDiv(id,posX,posY) {
 layerSetup(id).style.visibility = 'visible';
 layerSetup(id).style.left = parseInt(posX);
 layerSetup(id).style.top = parseInt(posY);
}

function hideDiv(id) {
 layerSetup(id).style.visibility = 'hidden';
}

function menuSetup(id,Ytop) {
 this.space = 10; // vertical space between the menus
 this.posX = 0; // distance from the left
 this.id = id; // id arguement.
 this.mainId = "mainMenu" + id; //name of main menu layer
 this.tipId = "theTip" + id; // name of description layer
 this.Ytop = Ytop; // Ytop arguement
 this.posY=3; // start from 0 from the top
 this.delay = 0; //delay of animation in miliseconds
 this.timer; //this is used to set/reset the timer
 this.measure = measure; // measures the height
 this.showMenu = showMenu; // shows the menu
 this.newPosition = newPosition; // move to new position
 this.layerMove = layerMove; // move layers
 this.slideMenu = slideMenu; //animate the menus
 this.showTip = showTip; //show the description
}

function measure() {
 mainMenuH[this.id] = getHeight(this.mainId);
 theTipH[this.id] = getHeight(this.tipId);
}

function showMenu() {
// Kick off from the top position
 posY=this.Ytop;
// Then loop through all the menus that are there to find the position of the next one:
 for (var i=0;i<=this.id-1;i++) {
  posY += parseInt(mainMenuH[i]) + this.space; //add the space between menu items
 }
 this.posY = posY; //make the object 'remember' where the menu is
 showDiv(this.mainId,this.posX,posY); //position it and make visible
}