11548 sujets

JavaScript, DOM et API Web HTML5

Salut, je cherche à intégrer une vidéo à mon site d'une page du genre video.php?id=1425345 sans passer par le request id de php

<OBJECT width="640" height="380"><PARAM name="movie" value="http://video.rutube.ru/<?php echo $_REQUEST['id']; ?>"></PARAM><PARAM name="wmode" value="window"></PARAM><PARAM name="allowFullScreen" value="true"></PARAM><EMBED src="http://video.rutube.ru/<?php echo $_REQUEST['id']; ?>" type="application/x-shockwave-flash" wmode="window" width="470" height="353" allowFullScreen="true" ></EMBED></OBJECT>


<script language="JavaScript">
ec=url('id');
document.write(ec+"-"+ec.length);
</script>



Bref voici le code de l'embed et celui de l'appel de la fonction javascript. Le problème est que lorsque je fais la manipulation suivante rien ne s'affiche. Quelqu'un a une idée, je suis débutant en javascript.


<OBJECT width="640" height="380"><PARAM name="movie" value="http://video.rutube.ru/<script language="JavaScript">
ec=url('id');
document.write(ec+"-"+ec.length);
</script>"></PARAM><PARAM name="wmode" value="window"></PARAM><PARAM name="allowFullScreen" value="true"></PARAM><EMBED src="http://video.rutube.ru/<script language="JavaScript">
ec=url('id');
document.write(ec+"-"+ec.length);
</script>" type="application/x-shockwave-flash" wmode="window" width="470" height="353" allowFullScreen="true" ></EMBED></OBJECT>