problem with explorer & firefox

A

ashie

i'm getting mad after this..
i have this code that goes well in firefox but not in explorer. the
code make a flash appear and do something and when i run it the flash
doesn't appear

[....] at the beginning of the html
<HTML>
<HEAD>
<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<TITLE>Forward Music Italy</TITLE>
<script language="JavaScript" type="text/javascript">
<!--
var temp = new Array;
var valoreLettoDalCookie=leggiCookie_s('flashCookie');

function scriviUno(){
document.write('<param name="movie" value="artisti-fl8.swf?
audiov='+leggiCookie_s('flashCookie')+'" />');
}

function scriviDue(){
document.write('<embed src="artisti-fl8.swf?
audiov='+leggiCookie_s('flashCookie')+'" quality="high"
pluginspage="http://www.macromedia.com/go/getflashplayer"
type="application/x-shockwave-flash" name="mainMovie" width="393"
height="383" />');
}

function scriviCookie(nome, valore, durata, misura, percorso, dominio,
sicurezza){
alert("dio scrittore|"+nome+" "+valore+"|");
if(arguments.length < 4)return; var tempo = (misura == "giorni") ?
durata * 24 * 60 : durata;
var termine = new Date();
termine.setTime(termine.getTime() + (tempo * 60 * 1000));
document.cookie = nome + "!" + escape(valore) + "; expires="
+ termine.toGMTString() +
((percorso == null) ? "" : ("; path=" + percorso)) +
((dominio == null) ? "" : ("; domain=" + dominio)) +
((sicurezza == true) ? "; secure" : "");
}

function leggiCookie(nome){
var IE = navigator.appName.indexOf("Microsoft") != -1;
var filmato = IE ? window.mainMovie : window.document.mainMovie;
var stringa = unescape(document.cookie);
var inizio = stringa.indexOf(nome + "!");
if(inizio == -1)return
var fine = stringa.indexOf(";", inizio);
fine = (fine != -1) ? fine : stringa.length;
var valori = stringa.substring(inizio + nome.length + 1,
fine).split("|");
for(var i = 0; i < valori.length; i++){
temp = valori.split("=");
alert("dio lettore|"+temp[0]+"|=|"+temp[1]+"|");
filmato.SetVariable(temp[0], temp[1]);
}
}

function leggiCookie_s(nome){
var stringa = unescape(document.cookie);
var inizio = stringa.indexOf(nome + "!");
if(inizio == -1)return
var fine = stringa.indexOf(";", inizio);
fine = (fine != -1) ? fine : stringa.length;
var valori = stringa.substring(inizio + nome.length + 1,
fine).split("|");
for(var i = 0; i < valori.length; i++){
temp = valori.split("=");
alert("dio lettore222|"+temp[0]+"|=|"+temp[1]+"|");
return temp[1];
}
}

// -->
</script>

[...] later in the html part


<td colspan="3" rowspan="2"> <object classid="clsid:D27CDB6E-
AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/
pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="393"
height="383">
<script>scriviUno();</script>
<param name="quality" value="high">
<param name="wmode" value="transparent" />
<script>scriviDue();</script>
</object></td>
 
A

ashie

solved!

Maybe someone can be interested in the anserw.
in my code i told the javascript to write some parte of the html: 2
rows inside an <td></td> tag.
firefox understood and went on.
explorer don't like javascript inside <td>!!
When i write all the content of the td in the html with the script
using document.write, all goes ok

i mean

function scriviTre(){
document.write('<td colspan=\"3\" rowspan=\"2\">');
document.write('<object classid=\"clsid:D27CDB6E-
AE6D-11cf-96B8-444553540000\" codebase=\"http://
download.macromedia.com/pub/shockwave/cabs/flash/
swflash.cab#version=6,0,29,0\" width=\"393\" height=\"383\">');
document.write('<param name=\"movie\" id=\"movie\" value=\"artisti-
fl8.swf?audiov='+leggiCookie_s('flashCookie')+'\" />');
document.write('<param name=\"quality\" value=\"high\">');
document.write('<param name=\"wmode\" value=\"transparent\" />');
document.write('<embed src=\"artisti-fl8.swf?
audiov='+leggiCookie_s('flashCookie')+'\" quality=\"high\" pluginspage=
\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-
shockwave-flash\" name=\"mainMovie\" width=\"393\" height=\"383\" /></
embed>');
document.write('</object></td>');
}

and later in the html

<script language="JavaScript" type="text/javascript">
<!--
scriviTre();
// -->
</script>

in the place of the whole td
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top