evenement onclick dans php
bonjour,
je doit mettre un document.getElementById dans un echo php mais rien ne s'affiche du a cette ligne :
onclick="document.getElementById(\'video\').style.display=\'block\';"
voici mon code :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| <?php
function ytshare() {
if($_POST){
$attachment = '';
$app = array('name'=>'youtube');
$video= '<img src="http://i4.ytimg.com/vi/'.$_POST['id'].'/default.jpg"/>
<img onclick="document.getElementById(\'video\').style.display=\'block\';" style="z-index:3;margin-left:-120px;margin-bottom:5px;" src="bouton-play.png">
<embed id="video" style="display:none;margin-top:-97px;" src="http://www.youtube.com/v/'.$_POST['id'].'?version=3&hl=en_US&rel=0" type="application/x-shockwave-flash" width="350" height="210" allowscriptaccess="always" allowfullscreen="true" id="ytvid" wmode="opaque"></embed>';
$share = stream_publish('a partagé <font color="#3b5998"><b>'.addslashes($_POST['title']).'</b></font> avec application Youtube
<p class="att_box">'.$video.'</p>',$attachment,$app);
}
}
?> |
merci