Hi,
i have the following code:
where i want the sound to only play during the false part of the IF statement
but currently it always plays on every reload, and even if the IF = true
any ideas? ive tried autoplay="0" also
Thanks
<embed src="beep.wav" autostart="false" width="0" height="0" id="sound1"
enablejavascript="true">
+
<script>
function PlaySound(soundObj) {
var sound = document.getElementById(soundObj);
sound.Play();
}
</script>
+
if( isset( $json['Data'] ) ){
echo "<b>Success</b>";
echo "</br>";
echo $data.' x ' .$tqty;
echo "</br>";
} else {
echo "Error";
echo "</br>";
echo $json['Message'];
echo '<script> PlaySound("Sound1"); </script>';
}