crashmaster Posted February 5, 2009 Share Posted February 5, 2009 I dont know, where this topic should I post... Hi there, I have index.php which every 60 seconds does AJAX request (checking if user has a new messages), and if response is positive AJAX inputs into HIDDEN <div> (style="display:none") => iframe, where is mp3 player is.. But the problem is: if <div> is hidden - sound doesn't play if <div> isn't hidden - it's shows IFRAME where I can see player, and the sound is played.. Any idea's how to play sound on background without showing hidden div and iframe ?? HTML: <body> <div id="play_sound" style="display:none"></div> ... {JS code} </body> {JS code} is: function check_updates() { var RESP = $.ajax({ type: 'post', url : '/pages/ajax/check_updates.php', cache: false, async: false }).responseText; if (RESP != ''){ $('#play_sound').html('<iframe src="http://www.dnbstep.cz/pages/ajax/play_sound.php" border="0" width="0" height="0"></iframe>'); } setTimeout("check_updates()",60000); } setTimeout("check_updates()",60000); PLAY_SOUND.php CODE is: <embed src="../../files/prehravac/player.swf" width="300" height="100" allowscriptaccess="always" allowfullscreen="true" flashvars="file=../../alarm.mp3&autostart=true" /> Btw: all PATH's are good. Link to comment https://forums.phpfreaks.com/topic/143863-php-iframe-css-js-play-sound/ Share on other sites More sharing options...
crashmaster Posted February 5, 2009 Author Share Posted February 5, 2009 any IDEAS ?? ((( Link to comment https://forums.phpfreaks.com/topic/143863-php-iframe-css-js-play-sound/#findComment-754923 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.