The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

> A way to have a single link deliver TWO href?
eabigelow
post Oct 13 2011, 03:06 PM
Post #1


Newbie
*

Group: Members
Posts: 13
Joined: 24-August 11
Member No.: 15,242



Hi--

I have a link that has an mp3 sound as its href:

CODE
<a href="sounds/genealogy.mp3" class="track track-default">this is a link</a>


Unfortunately, I also need that same link to go to a part on the site (href=#dombo) so that the sound plays on that part of the site.

Does anyone know how to accomplish this? I am imagining it would be with javascript, but honestly, I do not know.

Any help would be greatly appreciated. Many thanks...!

This post has been edited by eabigelow: Oct 13 2011, 03:07 PM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
 
Reply to this topicStart new topic
Replies
eabigelow
post Oct 13 2011, 05:35 PM
Post #2


Newbie
*

Group: Members
Posts: 13
Joined: 24-August 11
Member No.: 15,242



Perhaps I am doing it wrong? This is what I have tried, with variations of it, as well...

CODE
<a href="sounds/genealogy.mp3" class="track track-default" onclick="location.href = '#greenhouse'">




This post has been edited by eabigelow: Oct 13 2011, 05:37 PM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Oct 13 2011, 05:44 PM
Post #3


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



No, it's I who am totally confused. For some reason I was thinking pupups. No, you can't do it that way. The same window can't load two URLs at the same time. Sorry. blush.gif

Maybe it's possible with a function. Must think a little.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Oct 13 2011, 06:41 PM
Post #4


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



I don't think this can be done in the way you want. I'm sorry that I confused you (and myself). I tried with loading the mp3 in a hidden iframe, but page jump occurred for some reason I can't figure out.

You'd also have to handle that some browsers can (and will) play the mp3 and some can't.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 25th April 2024 - 07:32 AM