Connecting Tech Pros Worldwide Forums | Help | Site Map

Inserting MP3 into Valid HTML

Fleemo
Guest
 
Posts: n/a
#1: Sep 25 '08
I'm looking for a simple way to insert an MP3 file in the body of an
HTML page. The code below works, but it doesn't validate due to the
embed tag. Is there a way to rewrite the code so that it will validate
as either valid HTML, or better yet, XHTML?


<script>
function EvalSound(soundobj) {
var thissound=document.getElementById(soundobj);
thissound.Play();
}
</script>

<embed src="MY_SOUND.mp3" autostart="False" width="0" height="0"
id="sound1"
enablejavascript="true">

<form>
<input type="button" value="Play Sound" onClick="EvalSound('sound1')">
</form>

dorayme
Guest
 
Posts: n/a
#2: Sep 25 '08

re: Inserting MP3 into Valid HTML


In article
<4f71e9d1-0028-46d3-9ce5-ce157290fd4e@25g2000prz.googlegroups.com>,
Fleemo <fleemo17@comcast.netwrote:
Quote:
I'm looking for a simple way to insert an MP3 file in the body of an
HTML page. The code below works, but it doesn't validate due to the
embed tag. Is there a way to rewrite the code so that it will validate
as either valid HTML, or better yet, XHTML?
>
>
<script>
function EvalSound(soundobj) {
var thissound=document.getElementById(soundobj);
thissound.Play();
}
</script>
>
<embed src="MY_SOUND.mp3" autostart="False" width="0" height="0"
id="sound1"
enablejavascript="true">
>
<form>
<input type="button" value="Play Sound" onClick="EvalSound('sound1')">
</form>
Consider

<a href="thisSound.mp3">This sound</a>

It is liberating for you because it is so simple. It is great for users
because they or their browsers can then do what they want with it when
they want.

--
dorayme
zwsdotcom@gmail.com
Guest
 
Posts: n/a
#3: Sep 25 '08

re: Inserting MP3 into Valid HTML


On Sep 24, 8:46*pm, dorayme <doraymeRidT...@optusnet.com.auwrote:
Quote:
In article
<4f71e9d1-0028-46d3-9ce5-ce157290f...@25g2000prz.googlegroups.com>,
>
>
>
*Fleemo <fleem...@comcast.netwrote:
Quote:
I'm looking for a simple way to insert an MP3 file in the body of an
HTML page. The code below works, but it doesn't validate due to the
embed tag. Is there a way to rewrite the code so that it will validate
as either valid HTML, or better yet, XHTML?
>
Quote:
<script>
function EvalSound(soundobj) {
* var thissound=document.getElementById(soundobj);
* thissound.Play();
}
</script>
>
Quote:
<embed src="MY_SOUND.mp3" autostart="False" width="0" height="0"
id="sound1"
enablejavascript="true">
>
Quote:
<form>
<input type="button" value="Play Sound" onClick="EvalSound('sound1')">
</form>
>
Consider
>
* *<a href="thisSound.mp3">This sound</a>
>
It is liberating for you because it is so simple. It is great for users
because they or their browsers can then do what they want with it when
they want.
Amen brother. People who build pages with background music will be
first up against the wall when the revolution comes.
dorayme
Guest
 
Posts: n/a
#4: Sep 25 '08

re: Inserting MP3 into Valid HTML


In article
<cca15e36-6606-4910-9c66-9840f552af79@f36g2000hsa.googlegroups.com>,
zwsdotcom@gmail.com wrote:
Quote:
On Sep 24, 8:46*pm, dorayme <doraymeRidT...@optusnet.com.auwrote:
Quote:
In article
<4f71e9d1-0028-46d3-9ce5-ce157290f...@25g2000prz.googlegroups.com>,
Quote:
Quote:
Consider

* *<a href="thisSound.mp3">This sound</a>

It is liberating for you because it is so simple. It is great for users
because they or their browsers can then do what they want with it when
they want.
>
Amen brother. People who build pages with background music will be
first up against the wall when the revolution comes.
The sheer crying shame of it all, comrade, is that this will tend to
wipe out all those who do not own the means of production. It is the
factory workers desperately trying to be heard above the clatter of the
machinery that tend to do most of the embedding. Their leaders also
might wish to make unwelcome noise in the big houses. I have seen these
leaders meet and plan, and I have seen their motto:

autostart="true"/autoloud:"veryloud"

--
dorayme
Fleemo
Guest
 
Posts: n/a
#5: Sep 25 '08

re: Inserting MP3 into Valid HTML


>Consider
<a href="thisSound.mp3">This sound</a<

Thanks for the response, but the audio needs to be embedded on the
same page, it can't pop open another browser window.

dorayme
Guest
 
Posts: n/a
#6: Sep 26 '08

re: Inserting MP3 into Valid HTML


In article
<ca81eef4-d6b8-430c-a936-471b4750fcb6@x16g2000prn.googlegroups.com>,
Fleemo <fleemo17@comcast.netwrote:
Quote:
Quote:
Consider
<a href="thisSound.mp3">This sound</a<
>
Thanks for the response, but the audio needs to be embedded on the
same page, it can't pop open another browser window.
What has "Consider <a href="thisSound.mp3">This sound</a>" got to do
with "... it can't pop open another browser window".

Please quote who you are replying to. Many people here are not using
Google Groups.

--
dorayme
Fleemo
Guest
 
Posts: n/a
#7: Sep 26 '08

re: Inserting MP3 into Valid HTML


What has "Consider <a href="thisSound.mp3">This sound</a>" got to
do
Quote:
with "... it can't pop open another browser window".
>
Please quote who you are replying to. Many people here are not using
Google Groups.
Dorayme, I'm quoting you. As far as I can tell, using the simple
method you suggested results in the user being taken to a different
page. I need the audio to play on the same page as the trigger, be it
a link or a button.
Jim Morrison
Guest
 
Posts: n/a
#8: Sep 29 '08

re: Inserting MP3 into Valid HTML


I'm looking for a simple way to insert an MP3 file in the body of an
Quote:
HTML page. The code below works, but it doesn't validate due to the
embed tag. Is there a way to rewrite the code so that it will validate
as either valid HTML, or better yet, XHTML?
You can insert mp3 very easy without programming knowledge. Look at:
http://longurl.net/InsertMP3.aspx



prac
Guest
 
Posts: n/a
#9: Sep 29 '08

re: Inserting MP3 into Valid HTML


More informations

http://philippe.chappuis.googlepages...ying-mp3-files

I hope this will give you some ideas


---

http://philippe.chappuis.googlepages...e-page-creator

---
Closed Thread