Results 1 to 3 of 3
Related
-
PHP for automatically generating file/link list with file titles Forum: PHP Forum
Replies: 1 -
Free Short Subdomains Hosting? Forum: Web Hosting Forum
Replies: 1 -
Getting A Webpage to Load A Random Image (.swf) File Every Time It Loads Forum: Javascript Forum
Replies: 2
-
02-08-2011, 07:50 PM #1
I want play a short .wav file when image is clicked
Hi, I'm new to this forum and am not sure if I have the the correct one, but here is my problem.
I want to add a short sound file such as .wav to play when an image is clicked without
it showing the media player as a page, or if it does show the media player it should close it
and go back to the page the image is on. Is there a way to do this.
I'm a beginner at css, but have been using html for a while. I can't find a way to do this.
I tried the only code I could find but it opens the media player.
I'm in need of some guidance. John
Here's code from the page
<table border="0" width="100%">
<tr>
<td width="35%">
<img src="/baby/baby980.jpg" border="none" align="right"></a>
</td>
<td width="37%">
<center><a href="/sounds/laugh.wav"><img src="/gif/gifa/redrose180.gif" border="none"></a></center>
</td>
<td>
<img src="/baby/baby1080.jpg" border="none" align="left"></a>
</td>
</tr>
</table>
Here's the page:
http://mountaindream.freeoda.com/pages/pgtest6.html
-
02-09-2011, 09:56 AM #2
Re: I want play a short .wav file when image is clicked
Hi keytone, welcome to the forums
From http://www.phon.ucl.ac.uk/home/mark/audio/play.htm
Code:<script> function EvalSound(soundobj) { var thissound=document.getElementById(soundobj); thissound.Play(); } </script> <embed src="success.wav" autostart=false width=0 height=0 id="sound1" enablejavascript="true">
Code:<form> <input type="button" value="Play Sound" onClick="EvalSound('sound1')"> </form>
Dave
-
02-09-2011, 01:30 PM #3
Re: I want play a short .wav file when image is clicked
Thanks very much, it's more than I could come up with. John
Cloudjiffy- PaaS for Developers
10-05-2020, 12:30 AM in Web Hosting Forum