Jump to content

Play Sound


Mossy

Recommended Posts

Hi

I have added the following code to onclick event of the button

function click(sender, e, eOpts)
{ var audio1 = document.createElement('audio');
 audio1.setAttribute('src', 'files/Alert.wav');  
 audio1.play();
 }

However the following code is not firing the sound event.

btnSOS.Click;

How can I invoke the sound from code?

Thank you.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...