Ok, el problema esta casi resuelto. El codigo funciona en firefox y en internet explorer 7 pero o en Safari y no puedo entender por que.
Esta es la funcion javascript
:
Código:
<script type="text/javascript" language="javascript">
function createEmbed( href ) {
document.getElementById('film').innerHTML = "<embed id='film2' src='"+ href +"' autostart='true' width='730' height='350' wmode='transparent'></embed>";
}
function removeEmbed() {
//Find the box
var flash_box = document.getElementById( "trickDescription" );
//Find the embeded element
var embed = document.getElementById( "trickDescription" );
//Remove the embeded element
flash_box.removeChild( embed );
}
</script>
Esta funcion crea un nuevo <embed> con el nombre "film2". Para que esta funcion se ejecute se debe activar desde aqui:
Código:
<a href="#" onclick="javascript:createEmbed('/Fixafesten/flash/ilusionist/cards.swf');">link</a>
lo cual llamara al script para que reemplaze el embed que se ve en el siguiente codigo por el que la funcion "createEmbed" contiene:
Código:
<object width="730" height="350">
<param name="wmode" value="transparent"/>
<span id="film">
<embed id="film2" src="/Fixafesten/flash/ilusionist/snoret.swf" autostart="true" width="730" height="350" wmode="transparent"></embed>
</span>
</object>
Como dije antes, todo esto funciona correctamente firefox e IE7 pero por algun motivo no funciona en Safari.
Donde podra estar el problema???
Gracias