Hallo,
auch dir ein schönes Wochenende. Leider bin ich nicht viel weiter, auch wenn deine Idee mit der globalen Variable sinnig erschien. Der Code ist nun:
var MediaWin = null;
var MediaWinDoc = MediaWin.document;
[.. andere Funktionen ..]
function mediapopup(file,width,height,type) {
newwidth = width + 36;
if (type == "qt") { newheight = height + 48; mediaheight = height + 16; }
else { newheight = height + 36; }
MediaWin = window.open("/assets/media.html","MediaViewer","width=" + newwidth + ",height=" + newheight + ",screenX=100,screenY=100,resizable=yes,scrollbars=yes,menubar=no,status=yes");
MediaWinDoc.write('<html><head><title>MYSTerium.ch Media Viewer: ' + file + '</title></head><body><center>');
if (type == "qt") { MediaWinDoc.write('<embed src="' + file + '" type="video/quicktime" width="' + width + '" height="' + mediaheight + '" autoplay="true" controller="true" cache="true" title="Please note that the above content is likely copyrighted material and not free for use.">'); }
else { MediaWin.document.write('<img src="' + file + '" width="' + width + '" height="' + height + '" border="0" title="Please note that the above content is likely copyrighted material and not free for use."/>'); }
MediaWinDoc.write('</body></html>');
MediaWin.status = 'Please note that the above content is likely copyrighted material and not free for use.';
}
----------
Also. Auf Opera ging es sowieso nicht, da der wohl document.write() nicht kann. Mozilla (aktuelle NightlyBuild) öffnet nun zwei Fenster: eins in der richtigen Größe und ein normal großes. Bevor er irgendwas aufbaut, stürzt er ab. Bei IE ist weiterhin das Problem, dass er es erst richtig macht und ab dem zweiten Mal document.write() ignoriert und einfach nur die Dummy-Datei media.html anzeigt.
Vielleicht fällt dir ja noch was ein - oder jemand Anderem. Danke jedenfalls erstmal.