title: how I play .Wav sound in IE7,IE8,Safari and other supported browser using javascript
body: <p>I need to playing .Wav sound after success some stuff.I tried this one but its not working in IE7,IE8 and Safari whats wrong here?</p>
  
  <pre><code>var currentFile = "";
  function playAudio() {
          var oAudio = document.getElementById('myaudio');
  
          // See if we already loaded this audio file.
          if (jQuery("#audiofile").val() !== currentFile) {
  
              oAudio.src = jQuery("#audiofile").val();
              currentFile = jQuery("#audiofile").val();
  
          }
  
              var test = jQuery("#myaudio");
              test.src = jQuery("#audiofile").val();
              oAudio.play();   
      }
  
  
      if (Modernizr.audio) {
              if (Modernizr.audio.wav) {
                 jQuery("#audiofile").val("sound/smw_save_menu.wav"); 
  
              }
              if (Modernizr.audio.mp3) {
                  jQuery("#audiofile").val("sound/mario_coin.mp3");
  
              }
          }
          else {
            jQuery("#HTML5Audio").hide();
            jQuery("#OldSound").html('&lt;embed src="sound/smw_save_menu.wav" autostart=false width=1 height=1 id="LegacySound" enablejavascript="true" &gt;');
  
          }
  </code></pre>
  
  <p>I need to playing .Wav sound after success some stuff.I tried this one but its not working in IE7,IE8 and Safari whats wrong here?</p>