SitePoint Sponsor |
|
User Tag List
Results 1 to 5 of 5
-
Jul 28, 2007, 09:27 #1
- Join Date
- May 2007
- Posts
- 4
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Javascript to launch certain player in IE?
The problem that I am having is that when I click on my Gospel rap song link in IE 7; it keeps telling me to save the file. I don't want that to happen once its on the web. When I do a test run within Firefox and I click my songs, it automatically launches quicktime player to play my mp3 songs. I want the same thing to happen if they are using Internet Explorer The software I am using is Dreamweaver.
So is there a Javascript that will stop IE from telling the person to save the file once they click to here the mp3 file link?
Thanks in advance.
-
Jul 28, 2007, 10:38 #2
- Join Date
- Jun 2004
- Location
- Copenhagen, Denmark
- Posts
- 6,157
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
No, you need to configure your webserver to end the proper mimetype headers for the mp3 files. If you want to play the song in the browser, you could use a flash component to do that, instead of linking directly to the file. I recommend soundmanager2
-
Jul 28, 2007, 11:09 #3
- Join Date
- May 2007
- Posts
- 4
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Like I just went to look at an example of what I am trying to do. I went to amazon music and when you want to listen to an Artist, when you click on the "Listen" it will pop up a player and play the song. I looked at the code and it was in JavaScript.
<script type="text/javascript" language="JavaScript">
1
2<!--
3 if (browserHasRadio()){
4 document.write('<td class="listen">');var link = krexLink('/gp/recsradio/radio/B000QEIMBO/ref=pd_krex_dp_001001/102-6514833-5721704?ie=UTF8&track=001&disc=001');
5 document.write(link + 'Listen</a><img src="http://ec1.images-amazon.com/images/G/01/x-locale/detail/music/notes_clear._V47082447_.gif" width="14" alt="" align="bottom" class="icon" height="14" border="0" /></td>');}
6//-->
7</script>
<td class="listen">
<a href="javascript:amz_js_PopWin('/gp/recsradio/radio/B000QEIMBO/ref=pd_krex_dp_001001/102-6514833-5721704?ie=UTF8&track=001&disc=001',winName,winArgs);void(0);">Listen</a>
<img class="icon" width="14" height="14" border="0" align="bottom" alt="" src="http://ec1.images-amazon.com/images/G/01/x-locale/detail/music/notes_clear._V47082447_.gif"/>
</td>
So my webpage is simliar without the extras but, I simply want when the user clicks link(example: Respect Somethin) to my song(if they are using IE); it will pop-up a player and play the song.
-
Jul 28, 2007, 13:04 #4
- Join Date
- Jun 2004
- Location
- Copenhagen, Denmark
- Posts
- 6,157
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
-
Jul 29, 2007, 09:21 #5
Bookmarks