Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Inserting MP3 into Valid HTML

0 views
Skip to first unread message

Fleemo

unread,
Sep 24, 2008, 8:03:15 PM9/24/08
to
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

unread,
Sep 24, 2008, 8:46:29 PM9/24/08
to
In article
<4f71e9d1-0028-46d3...@25g2000prz.googlegroups.com>,
Fleemo <flee...@comcast.net> wrote:

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

zwsd...@gmail.com

unread,
Sep 24, 2008, 10:25:57 PM9/24/08
to
On Sep 24, 8:46 pm, dorayme <doraymeRidT...@optusnet.com.au> wrote:
> In article
> <4f71e9d1-0028-46d3-9ce5-ce157290f...@25g2000prz.googlegroups.com>,

Amen brother. People who build pages with background music will be
first up against the wall when the revolution comes.

dorayme

unread,
Sep 24, 2008, 11:06:46 PM9/24/08
to
In article
<cca15e36-6606-4910...@f36g2000hsa.googlegroups.com>,
zwsd...@gmail.com wrote:

> On Sep 24, 8:46 pm, dorayme <doraymeRidT...@optusnet.com.au> wrote:
> > In article
> > <4f71e9d1-0028-46d3-9ce5-ce157290f...@25g2000prz.googlegroups.com>,
> >

> > 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

unread,
Sep 25, 2008, 2:47:11 PM9/25/08
to
>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

unread,
Sep 25, 2008, 9:14:36 PM9/25/08
to
In article
<ca81eef4-d6b8-430c...@x16g2000prn.googlegroups.com>,
Fleemo <flee...@comcast.net> wrote:

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

unread,
Sep 26, 2008, 4:31:18 PM9/26/08
to
> 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, 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.

dorayme

unread,
Sep 26, 2008, 7:42:48 PM9/26/08
to
In article
<8e917144-0656-41f2...@q26g2000prq.googlegroups.com>,
Fleemo <flee...@comcast.net> wrote:

> > 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, I'm quoting you.

I meant quoting who says things. (It is not about me, it is a general
point. You quote the subscribers' names who say things and in what
order. So people can follow threads better.)

> 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.

I was meaning that this is not so bad. If they do go to "another page"
as you put it. And it frees you up to design around such simplicity.

Just by the way, it might go to another tab, it might simply open an
application on a user's computer. All depends on the user's set up.

But I do understand. You want the thing to open right there and there on
your page! Like on youTube.

To do this really well, I understand, you can use Flash. But I am no
expert on this. There are quite a few threads about it. Perhaps you
might care to search this and related usenet groups using the "flash"
word in your search.

In your opening post, I recall you saying that various things you have
tried "work". If this is really true, what really are you worried about?
A niggling doubt that it won't work? <g>

--
dorayme

Jim Morrison

unread,
Sep 29, 2008, 6:18:09 AM9/29/08
to
> 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?

You can insert mp3 very easy without programming knowledge. Look at:
http://longurl.net/InsertMP3.aspx

prac

unread,
Sep 29, 2008, 11:07:04 AM9/29/08
to
0 new messages