Quantcast
Channel: Sound Alert on client side on web page
Viewing all articles
Browse latest Browse all 10

Re: Sound Alert on client side on web page

$
0
0

Since i was not able to figure out how to make it work,have chosen other solution which is much simpler so that in case somebody need it can refer:

 Place this above end of body tag in master page:

<audio id="audiotag1" src="sounds/sound.wav" preload="auto"></audio><script type="text/javascript">       

	function alert_sound() {
	    document.getElementById('audiotag1').play();
	}

    </script>

and now you can call it any page on page load:

ScriptManager.RegisterStartupScript(this, GetType(), "PlaySound", "setTimeout(function(){alert_sound();},10);", true);

Thanks!


Viewing all articles
Browse latest Browse all 10

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>