Hi can anyone help, how do you add or embed sound to a hyperlink.
So if press the hyperlink and before the page load i want the sound to go on.
Please let me know if anyone can help me.
thank you
Hi can anyone help, how do you add or embed sound to a hyperlink.
So if press the hyperlink and before the page load i want the sound to go on.
Please let me know if anyone can help me.
thank you
Probably the best (or most successful) way would be to use Flash. Perhaps javascript could do it, but it might cause errors in certain browsers. As far as plain HTML goes, you will not be able to do it.
Hope this helps.
How would i do it JScripts.
can you give an example showing me hyperlink with a sound clip please.
thanks
Okay, I fiddled around with this a bit and discovered that no matter which way you pull it, you can't change the "src" attribute for an embed. The only way I could see how to do it was like this:
Code:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Music Player</title> <script type="text/javascript"> function play(file) { var plist = document.getElementById("playarea"); plist.innerHTML = '<embed src="'+file+'">'; } </script> </head> <body> <div id="playarea"> <embed src="mysong1.mp3"> </div> <br><a href="javascript:play('mysong2.mp3')">play song</a> </body> </html>
- Mike
What i wanted was
the text is called log out. now if i click on that text it will take me to another page (href=http//:www.www.com). before that loads up i want the sound to go on. (.wav file).
thats what im looking for.
Please show me how to do that.
thanks
Simple answer... you can't. Even using a server side language, you are trying to make the browser do two things, in two different spots at once.
For example, you are telling the browser to parse this sound on click, okay we can do that. You can also tell the browser to go to another page on click. Sure. But telling browser to go to page X, WHILE playing sound from page Y... nope.
As stated, you can do it in a Flash movie, but without a ton of coding, know how and confusing jargon.. you can't.
I wont tell you it's impossible, but I can tell you there isn't a ready made script that will do this (at least not one that will work proper.)
{CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
Follow Me on Twitter: @InkingHubris
PHP Code:$result = mysql_query("SELECT finger FROM hand WHERE id=3");
echo $result;
well, what you can do is create a page... sound.html for instance... and link your href to it, then embed a quick sound on that top play and add java to make it redirect in like 2 seconds... other than that you got me
and spell out the entire word? pfft yea right :P
Well considering they are 2 completely different languages, it makes a HUGE difference. Of course you could have just typed "JS" and saved another 2 letters...
{CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
Follow Me on Twitter: @InkingHubris
PHP Code:$result = mysql_query("SELECT finger FROM hand WHERE id=3");
echo $result;
Bookmarks