Flash und JavaScript

SteveH

Grünschnabel
Ich verwende im Flash einen JavaScript Befehl für ein popup Fenster es funktioniert aber nur
im FireFox und nicht im Internet Explorer.

Link für das popup Fenster im FlashMX:

on (release) {
getURL("JavaScript:OpenPopUp('maibaum.html','','width=350,height=350')", "_self");
}

Html Code:

<html>
<head>
<title>ffzelking.at</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript1.4">
<!--
function OpenPopUp(theURL,winName,features) { window.open(theURL,winName,features);
}
//-->
</script>
</head>

<body bgcolor="#CCCCCC" leftmargin="0" marginheight="0" marginwidth="0" topmargin="0" rightmargin="0" bottommargin="0">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td align="center" valign="middle"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" height="600" width="800">
<param name="movie" value="hp_122004.swf">
<param name="quality" value="high">
<embed height="600" pluginspage="http://www.macromedia.com/go/getflashplayer" src="hp_122004.swf" quality="high" type="application/x-shockwave-flash" width="800">
</object></td>
</tr>
</table>
</body>

</html>
 
Hi,

wird das PopUp vielleicht geblockt?

Ansonsten: Probiers mal mit:
HTML:
<script type="text/javascript">
Das type-Attribut ist (im Gegensatz zum language-Attribut) vorgeschrieben.

Gruß
.
 
funktioniert nicht! Komischer weise funktionierte es am MAC im IE nur am PC nicht!
wenn ich die HTML datei im Golive öffne und sie intern am PC teste funktioniert es!
 
Was macht denn das _self da?

Hier ein Beispiel, das ich immer verwende (nicht selbst ausgedacht, vor langer Zeit in einem anderen Board gefunden), das Popup zentriert und funktioniert

Html
Code:
<script language="javascript"> 
   <!-- 
   function winOpen(url, breite, hoehe) {
      links = (screen.width/2)-(breite/2);
      oben = (screen.height/2)-(hoehe/2);
      window.open(url,"popup","height="+hoehe+",width="+breite+",status = no,toolbar = no,menubar = no,location = no,resizable = no,titlebar = no,scrollbars = no,fullscreen = no,top ="+oben+",left ="+links);
   } 
   //--> 
</script>
In Flash
Code:
on (release) {
        getURL("javascript:winOpen('deineseite.html', 300, 200); void(0);");
}
Gruß
Rena
 
Zuletzt bearbeitet:
Funktioniert im IE noch immer nicht (auf FireFox funktionierts) bin kurz vor dem Verzweifeln

So schaut der Html Text jetzt aus:

<html>
<head>
<title>ffzelking.at</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript">
<!--
function winOpen(url, breite, hoehe) {
links = (screen.width/2)-(breite/2);
oben = (screen.height/2)-(hoehe/2);
window.open(url,"popup","height="+hoehe+",width="+breite+",status = no,toolbar = no,menubar = no,location = no,resizable = no,titlebar = no,scrollbars = no,fullscreen = no,top ="+oben+",left ="+links);
}
//-->
</script>
</head>

<body bgcolor="#CCCCCC" leftmargin="0" marginheight="0" marginwidth="0" topmargin="0" rightmargin="0" bottommargin="0">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td align="center" valign="middle"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" height="600" width="800">
<param name="movie" value="hp_122004.swf">
<param name="quality" value="high">
<embed height="600" pluginspage="http://www.macromedia.com/go/getflashplayer" src="hp_122004.swf" quality="high" type="application/x-shockwave-flash" width="800">
</object></td>
</tr>
</table>
</body>

</html>


In Flash:

on (release) {
getURL("javascript:winOpen('maibaum.html', 350, 350); void(0);");
}


und so die Html vom zu öffnenden Fenster:

<html>
<head>
<title>Bilder Maibaumaufstellen</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#adaaad" leftmargin="0" marginheight="0" marginwidth="0" topmargin="0">
<b><font face="Arial, Helvetica, sans-serif" size="2" color="#FFFFFF"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.#version=5,0,30,0" height="350" width="350">
<param name="movie" value="Maibaum_Bilder.swf">
<param name="quality" value="best">
<param name="play" value="true">
<embed height="350" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" src="Maibaum_Bilder.swf" type="application/x-shockwave-flash" width="350" quality="best" play="true">
</object></font></b>
</body>
</html>
 
Gibt der IE denn irgendeinen JavaScript-Fehler aus?

Hast Du mal probiert (wie ich oben meinte), ein type-Attribut für den Script-Tag anzugeben?

Gruß

P.S.: Bitte verwende zum Posten von Code doch die entsprechenden Tags (PHP, CODE, HTML). Es ist ziemlich anstrengend, Code zu lesen, der in der Standardformatierung gepostet wird.
.
 
Beim IE (PC) kommt keine Fehlermeldung, es tut sich einfach nichts.
Den Type-Attribut für den Script-Tag anzugeben hab ich auch schon versucht funktioniert im IE auch nicht!
 
Zurück