Currently, I am attempting to get my software to play an audio file once a specific condition is met. Being a newcomer to Javascript, there's a chance that I've overlooked something obvious. Each time I execute the following code, I encounter the error "Cannot call method 'Play' of null."
<script type="text/javascript">
function EvalSound(soundobj) {
var sound= document.getElementById(soundobj);
sound.Play(soundobj);
}
</script>